|
Did you install the MATLAB Compiler Toolbox? What about MATLAB C/C++ MATH Library?
Best regards,
A. Riazi
|
|
|
|
|
What are you trying to do. I have MATLAB and a lot of toolboxes. MATLAB.h is not in my installation either. I have never run across anything that needs that include file.
If you are simply trying to call the matlab engine from your own program, you need engine.h. Also, look at the CP articles by A. Riazi and there is an online tutorial on Matlab's website.
|
|
|
|
|
Thanks for the response guys. I think I know what is wrong with the program. My friend emailed me this:
http://www.mathworks.com/support/solutions/data/1-TUUKR.html?solution=1-TUUKR
|
|
|
|
|
which one is better to use either union or struct.
rajesh
|
|
|
|
|
Depends what you want to do. The point of a union is that you have one value only, and you can change it's type ( that is, you can store an int or a string (for example), not that it has inbuilt conversion between types ). The point of a struct is to collect a group of values. Here's a link to what a union is.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccelng/htm/class_29.asp[^]
A struct is a class whose default access is public. They both exist because they do two different things.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Rajesh_K_Sharma wrote:
which one is better to use either union or struct.
Depends on Situations.But, personally I have never liked Union!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
personally I have never liked Union!.
sometimes, it become THE feature to be used...
i remember a project i made last year, when i was programming for a microprocessor... we had to know how the processor memory was, where would be stored the hardware datas, and to implement this (wheter the periph was reading or writing), the datas was in distinct registries. but sometimes happend the fact that those two registries were at the same address...
so, what to use ? union s...
but i agree, it's not the most easy thing to learn about from C.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
when i was programming for a microprocessor... we had to know how the processor memory was,
Hi Tox,
As I don't program in MicroController/hardware, Unions would never be my first Choice.
That's just my personel feeling, I am not forcing any BODY to use structure instead of UNIONS.
It's always DEPENDS ON SITUATION which one is better,
let takes a example,if you want to keep Name and age of employee in a DATA STRUCTURE, your choice always would be STRUCTURE (in case of C ) as you don't want to mess up the data!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
It's always DEPENDS ON SITUATION which one is better
that's logic, i entierly agree with you sir...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
sir...
.............It's a great Pleasure!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
This means that you have never needed union . There is nothing to like or not to like. In fact, the union was introduced by John von Neumann (first computer idea creator) at the beginning of 20th century, if I'm not wrong, when he presented interpretting of a memory word once as a machine code or secondly as a piece of data. Thus you have the ancient union .
|
|
|
|
|
liquid_ wrote:
This means that you have never needed union
Hello Mr Liquid,
I Believe, I am repeating myself i am application developer, It's really depend upon situation of project which thing will be better. you don't want to mess data of Student Name, Age and Class by using the UNION.
yeah i know UNION ar emuch better in other cases as mentioned by Mr Tox!
Thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
using union is good think if u really know where to use n how to use it.
I pesonaly use union as annonymous inside class or struct coz suppose if u have more than one embeded class-object in some class n want to select any one of it then u can use union to allocate memory only for one of that, so no need to allocate memory for each n every embeded class-object, so union is good to use
|
|
|
|
|
to sum up,
use struct s when you don't have to make a choice and want all the members to be available at the same time,
use union s when datas can be hidden by some others, and the fact that another member write the same memory area shouldn't care.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I want to save a web page just from a url.that means i don't want to navigate to that url first.
I want all the resources are saved correctly. The links in the local page that saved must also be active.
One more,I don't use wbebrowser ctrl. There should not show a save as dialog box just like IE. The saving procress should be done silently.
Thank you everyone. Any ideas?
|
|
|
|
|
You need to connect to the site, and download the HTML. Then you can use a regex to trawl it for links to resources, and download those ( boost has a regex add in for C++ ). If you want the links on the page to work offline, then you need to change them to something local, and repeat the process for those pages, so they get downloaded as well, to the location that the new link points to. If you do this recursively, you'll need a big hard drive, and to do some checking for circular links.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Tcpip2005 wrote:
I want to save a web page just from a url.
Hello Mr TCPIP,
Please take a look at this Link:-
http://www.codeproject.com/internet/amhttputils.asp[^]
this article gives a brief overview and Wrapper class to save the webpage from a URL!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
i get the handle of a textbox in an opened window using the function
EnumChildWindows(,,)..
after i obtained the handle of this textbox i want to set a specific
string in this textbox.
"HINT" : the function SetWindowText(,) isn't a valid to this task(why?)
more--->
the opened window has a textbox ,a button ,a label;
and when i used the spy++ program of Microsoft tools to get the caption
to each of them after using SetWindowtext(,),i observed that:
the caption of the label is same as the value appears on it<the
caption="" and="" value="" appears="" are="" equal="" to="" each="" other="" the="" string
posted="" by="" setwindowtext()=""> ,BUT
the caption of the textbox isn't the same as the value appears on it
<the value="" is="" nothing="" but="" the="" caption="" equal="" to="" string="" posted="" by=""
setwindowtext()="" function="">then i want an API function to set the value of the textbox not the
caption..
thank you very much for any help..
Sender :Amr abdel mohsen
Email: app_prog@yahoo.com
amr
|
|
|
|
|
You can also check for WM_SETTEXT Window Message
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
i get the handle of a textbox in an opened window using the function
EnumChildWindows(,,)..
after i obtained the handle of this textbox i want to set a specific
string in this textbox.
"HINT" : the function SetWindowText(,) isn't a valid to this task(why?)
more--->
the opened window has a textbox ,a button ,a label;
and when i used the spy++ program of Microsoft tools to get the caption
to each of them after using SetWindowtext(,),i observed that:
the caption of the label is same as the value appears on it<the
caption="" and="" value="" appears="" are="" equal="" to="" each="" other="" the="" string
posted="" by="" setwindowtext()=""> ,BUT
the caption of the textbox isn't the same as the value appears on it
<the value="" is="" nothing="" but="" the="" caption="" equal="" to="" string="" posted="" by=""
setwindowtext()="" function="">then i want an API function to set the value of the textbox not the
caption..
thank you very much for any help..
Sender :Amr abdel mohsen
Email: app_prog@yahoo.com
ÚãÑæ ÚÈÏ ÇáãÍÓä
|
|
|
|
|
Hi All
I am trying to include the inch symbol (ie " the same as a double quotation mark) in a function that requires a text string input between double quotation marks along the lines of: ?
SysAllocStringByteLen("Some text with the inch symbol" and then end",44)
How do I mark the " inch symbol so that it is not mistaken as the end of the text string
Regards
Jeremy
|
|
|
|
|
SysAllocStringByteLen("Some text with the inch symbol\" and then end",44)
|
|
|
|
|
Brilliant!! Many thanks for that!
|
|
|
|
|
I'm writting a function which send PostScript file directly to printer. Although it works, the paper is always the default size(A4).
To change paper size, I use SetPrinter(). But SetPrinter() need administrator privilege, and the printer is a shared printer of another computer in the network, which means no admin privilege can be got.
How to solve the problem f or setting paper size?
-------------------------------------------------------------------
PRINTER_DEFAULTS Defs;
PRINTER_INFO_2 *pPrnInfo2;
CPrintDialog dlg(TRUE);
DEVMODE *pDevMode;
CString szDeviceName;
HANDLE hPrinter;
DWORD dwNeeded;
if (dlg.DoModal() != IDOK) // select printer
return;
szDeviceName = dlg.GetDeviceName();
pDevMode = dlg.GetDevMode();
Defs.pDatatype = "RAW";
Defs.pDevMode = pDevMode;
Defs.DesiredAccess = PRINTER_ACCESS_USE; // if this, SetPrinter() failed
//Defs.DesiredAccess = PRINTER_ACCESS_ADMINISTER; // if this, OpenPrinter() failed
if (OpenPrinter((LPTSTR)(LPCTSTR)szDeviceName, &hPrinter, &Defs))
{
// Set Printer
GetPrinter(hPrinter, 2, 0, 0, &dwNeeded);
hGlobal = GlobalAlloc(GHND, dwNeeded);
pPrnInfo2 = (PRINTER_INFO_2 *)GlobalLock(hGlobal);
GetPrinter(hPrinter, 2, (LPBYTE)pPrnInfo2, dwNeeded, &dwNeeded);
pPrnInfo2->pDevMode->dmPaperSize = DMPAPER_A3;
if (!SetPrinter(hPrinter, 2, (LPBYTE)pPrnInfo2, 0))
TRACE("\n%d", GetLastError());
// Printing
DocInfo.pDocName = "EPS Document";
DocInfo.pOutputFile = NULL;
DocInfo.pDatatype = "RAW";
StartDocPrinter(hPrinter, 1, (LPBYTE)&DocInfo);
StartPagePrinter(hPrinter);
WritePrinter(hPrinter,....);
EndPagePrinter(hPrinter);
EndDocPrinter(hPrinter);
GlobalUnlock(hGlobal);
GlobalFree(hGlobal);
}
GlobalUnlock(pDevMode);
ClosePrinter(hPrinter);
|
|
|
|
|
For example i have written a program located on :
C:\..somewhere..\myprogram.exe
my problem is that i want to get the full path from where my program was launched.For example if my program is launched from C:\ProgramFiles\MyPrograms\Bin\myprogram.exe then i need to get this path.But i don't know how
Can anyone help ???
Regards,
m0n0
|
|
|
|
|