Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hello World! - nothing works.
Message
From
08/04/1998 23:56:19
 
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00090585
Message ID:
00090672
Views:
32
What kind of project have you created?

Vlad

>As you should guess from the title, this is my first Visual C++ program. I have created a project, blah blah blah, and built an exe - all ok! When I run it nothing happens. No messagebox, fopen/fputs/fprintf don't work - nothing. I have plenty of C/C++ experience and have written some very large apps in C. I am experienced in VFP also. Anybody know what is wrong with these two examples???
>
>
>#include
>
>void winmain(void)
> {
> int nTemp;
> nTemp=MessageBox(NULL,"Hello World",NULL,MB_OK);
> }
>
>------
>
>#include
>#include
>
>void winmain(void)
> {
> FILE *filehandle;
>
> filehandle=fopen("c:\test.txt","w");
> fprintf(filehandle,"%s\n","Hello World");
> fclose(filehandle);
> }
>
>In the second example, I have trimmed this down as it did a few other things too. This trimmed down version has been tested and no file was created. I don't understand this at all. Anybody help me? TIA,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform