If anyone can help me with getting this very basic code to work, it would be GREATLY appreciated. Here it is:
Code:
#include <iostream.h>
#include <string.h>
main ()
{
string File; // define "File" as a string
if (File == FILENAME) // define "File" as a "Filename"
{
if (File EXISTS) // check if "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
else // if "File" doesn't exist
{
if (File == FILENAME) // define "File" as NEW "Filename"
{
if (File EXISTS) // check if NEW "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
}
else // if "File" doesn't exist
{
if (File == FILENAME) // define "File" as NEW "Filename"
{
if (File EXISTS) // check if NEW "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
}
else // if "File" doesn't exist
{
if (File == FILENAME) // define "File" as NEW "Filename"
{
if (File EXISTS) // check if NEW "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
}
else // if "File" doesn't exist
{
if (File == FILENAME) // define "File" as NEW "Filename"
{
if (File EXISTS) // check if NEW "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
}
else // if "File" doesn't exist
{
if (File == FILENAME) // define "File" as NEW "Filename"
{
if (File EXISTS) // check if NEW "File" exists
{
cout << "MESSAGE" << endl; // if so displays appropriate message
}
}
}
return (0);
}
PS = I know I could use a loop for this, but this just complicates everything for me with creating new arrays and such. I would like to start SIMPLE as I do not need to check for more than 6 different files.
Thanks ALOT in advance!!
Peace.

