Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic C++
Message
From
06/07/2000 12:55:57
 
General information
Forum:
Visual C++
Category:
Other
Title:
Miscellaneous
Thread ID:
00388938
Message ID:
00388971
Views:
17
Evan,

Try this link for starters:-

http://devcentral.iftech.com/learning/tutorials/subcpp.asp

If you need help with the Visual C++ IDE then just shout, its a lot easier than you would think (honest!).

To point you in the right direction then the code below was compiled with VC++ 6 SP4 (don't look if you want to do this yourself :-)).

HTH
Neil




#include
#include

#include

void main(void)
{
FILE *InStream;
char Filename[_MAX_PATH];

// This assumes sample.txt contains one line with a valid filename.
if ((InStream = fopen("sample.txt", "r")) != NULL)
{
if (fgets(Filename, _MAX_PATH, InStream) == NULL)
printf("Error trying to open sample.txt\n");
else
{
// Lots of ways to do this bit.
printf("Attempting to execute %s", Filename);
WinExec(Filename, SW_SHOWNORMAL);
}

fclose(InStream);
}
}
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform