Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hello World! - nothing works.
Message
 
To
All
General information
Forum:
Visual C++
Category:
Other
Title:
Hello World! - nothing works.
Miscellaneous
Thread ID:
00090585
Message ID:
00090585
Views:
54
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,
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Next
Reply
Map
View

Click here to load this message in the networking platform