Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hello World! - nothing works.
Message
Information générale
Forum:
Visual C++
Catégorie:
Autre
Divers
Thread ID:
00090585
Message ID:
00090690
Vues:
27
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform