|
Not according to the standard, it isn't.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Yeah. I got your mail. Replied to it, but it bounced. I thought your post might confuse the original poster into thinking that, that might have been the cause of error.
Regards
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
Fair enough, although it's not quite what you said. Funny that I couldn't post and you couldn't mail me ( well, obviously both caused by our network so not really *that* funny ).
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
void main () is perfectly legal
Absolutely not!
The return-value from main() is used as the argument to exit(). Using a void main() is the same thing as using the buggy MSVC6 and writing int main() {} , where the (C++) standard explicitly states that an implicit "return 0;" should be injected before the end of main in this case.
Since Win32 IA32 returns values in eax, both the displayed MSVC6 example and your code returns whatever eax happened to to contain at the moment of return.
Nice return value to give exit(), eh?
/Mike
|
|
|
|
|
I am assuming you are using the StringTokenizer class.
If that is so, then this question would be better asked in the forum attached to that article, then the author will see it and he will answer your question.
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
Hmm, because you didn't tell what the problem is, it's kind of difficult to know why it doesn't work. However there's a memory leak: a new Foo object is created for each row in the file, but you only delete it once. What's the point of having a dynamic Foo BTW? Also, IMHO its bad practice to mix malloc/free with new/delete.
|
|
|
|
|
Hey guys
How do you launch an application from c++ i know u can use shellexecute but this uses the default program is there a way to launch a program from your program. Basically i am writing a program that needs to copy a file then launch regsvr32.exe to register this dll.
Cheers
Peter
|
|
|
|
|
Couldn't you do a:
ShellExecute(NULL, NULL, _T("regsvr32.exe yourdll"), NULL, _T("C:\\WINNT"),SW_SHOW);
not sure why you want to get away from ShellExecute.
Rob
|
|
|
|
|
Cheers didn't know you could do that.
|
|
|
|
|
CreateProcess() will also do what you want.
--CoolDev
|
|
|
|
|
The ANSI C way (according to MSDN) is to use system() .
|
|
|
|
|
Hey Guys
Sorry but i got yet another question. What would be the easiest way to copy a file from one place to the other without copying the file attributes.
Peter
|
|
|
|
|
|
how do you link to a web page in a MFC dialog program?
|
|
|
|
|
You mean create a link you can click on ? Create a static, and when the user clicks on it, use ShellExecute with the link as the property and no path, it will run in the default browser.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
did that... didn't work - pretty sure i messed up somewhere.
could you provide an example for me?
|
|
|
|
|
If you took the time to log in then I would have got an email to say you'd replied and gladly done so. It appears another solution has been offered in the meantime.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
sorry i don't have an account.
but - thanks for your time.
got it to work now.
|
|
|
|
|
Look on this site for the CHyperlink class. Trivial once you add that to the project.
|
|
|
|
|
sweet thanks for help.
got it to work.;)
|
|
|
|
|
Hey guys
Is there away to detect the standard windows\system directory for an OS. becuase windows and winNT based systems have different paths ie winnt is \winnt\system32 and windows is windows\system32 or it could be completly diffrent if the user choose to install windows to a different directory.
|
|
|
|
|
::GetSystemDirectory
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Hey Guys
Another question
How do i get the handle to module in an executable i tried _Module.GetInstance() but it just through up errors. Saying that it was an undeclared identifier.
I need the handle so i can use loadstring.
Cheers
Peter
|
|
|
|
|
GetModuleHandle(NULL) will return the handle of the calling process
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
That Doesn't want to work either
i keep getting the error _Module is an undeclared identifier.
|
|
|
|