/*I used and modified a piece of code i found in here and my main(){} looks like this:*/
int main()
{
HANDLE hConsole;
char welcome_l1[100];
char welcome_l2[100];
char welcome_l3[100];
char welcome_l4[100];
unsigned short k=120;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
ifstream file("ver");
file.getline(welcome_l1, 100);
file.getline(welcome_l2, 100);
file.getline(welcome_l3, 100);
file.getline(welcome_l4, 100);
SetConsoleTextAttribute(hConsole, k);
cout<<welcome_l1 <<"\n";
cout<<welcome_l2 <<"\n";
cout<<welcome_l3 <<"\n";
cout<<welcome_l4 <<"\n";
SetConsoleTextAttribute(hConsole, 8);
return 0;
}
<< moderator edit: added [code][/code] tags and indented code >>
/*My -ver- file prints out the version of the program and the author. I have a big problem though if i want to use variables stored in files with differend extensions, like "*.rc" for example. I want my program to be extremely flexible, i dont want to recompile it 1000 times. So is anyone here able to suggest how to store && use (and why not modify) data from external files?
I want to mention that my program is and will not be commercial...*/