Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hello World! - nothing works.
Message
 
To
08/04/1998 23:56:19
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00090585
Message ID:
00090690
Views:
26
I tried Win32 and Win16 projects - neither worked. If I can get my head round this simple bit, I should be home free!
>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,
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform