I am at the very beginning of programming (Took some free tutorials so i know very little to programming and i started a small program for a game i play. As i started and when i was done for the small amount of time i had i wanted to compile it and test it to see if what i had so far worked...and ofcourse since im a beginner it didnt work and i dont know why. Here is what i have so far.
#include <iostream> // I am not sure if these
#include <iomanip> // 3 files our needed
#include <cstdio> // to run program (This is not full program)
int main () {
int calc_choice;
using namespace std;
cout << "Welcome to Azbac's program of Everquest Calculators!" << ;
cout << "All results are an average from information i have found" << ;
cout << "And may not be 100% Correct" << ;
cout << " " << ;
cout << "********************************************************" << ;
cout << " " << ;
cout << "For Mana Calculator type " << "1 " << "followd by enter" ;
cout << "For Haste/Delay Calculator type " << "2 " << "followd by enter" ;
cout << "Choice: " ;
cin >> calc_choice ;
return 0;
}
Thats it. What i want it to do (from what i have so far) is display all that text in " "s and let them select 1 or 2. Selecting 1 or 2 sets the value for the variable calc_choice. Since i do not have much so far can you just tell me whats wrong with it or write me a new one (Since what im asking for so far is very short). Any help is greatly appreciated. Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#include <iostream> // I am not sure if these
#include <iomanip> // 3 files our needed
#include <cstdio> // to run program (This is not full program)
using namespace std; // CLS needed to avoid std::cout and std::cin
int main ()
{
int calc_choice;
using namespace std;
cout << "Welcome to Azbac's program of Everquest Calculators!\n"; // CLS you had << ; that is a no-no
cout << "All results are an average from information i have found\n"; // CLS use either '\n' or "\n" or endl
cout << "And may not be 100% Correct\n"; // CLS for new-line...
cout << endl;
cout << "********************************************************\n";
cout << endl;
cout << "For Mana Calculator type " << "1 " << "followed by enter\n";
cout << "For Haste/Delay Calculator type " << "2 " << "followd by enter\n";
cout << "Choice: ";
cin >> calc_choice ;
return 0;
}
Curtis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am at the very beginning of programming (Took some free tutorials so i know very little to programming and i started a small program for a game i play. As i started and when i was done for the small amount of time i had i wanted to compile it and test it to see if what i had so far worked...and ofcourse since im a beginner it didnt work and i dont know why. Here is what i have so far.
#include <iostream> // I am not sure if these
#include <iomanip> // 3 files our needed
#include <cstdio> // to run program (This is not full program)
int main () {
int calc_choice;
using namespace std;
cout << "Welcome to Azbac's program of Everquest Calculators!" << ;
cout << "All results are an average from information i have found" << ;
cout << "And may not be 100% Correct" << ;
cout << " " << ;
cout << "********************************************************" << ;
cout << " " << ;
cout << "For Mana Calculator type " << "1 " << "followd by enter" ;
cout << "For Haste/Delay Calculator type " << "2 " << "followd by enter" ;
cout << "Choice: " ;
cin >> calc_choice ;
return 0;
}
Thats it. What i want it to do (from what i have so far) is display all that text in " "s and let them select 1 or 2. Selecting 1 or 2 sets the value for the variable calc_choice. Since i do not have much so far can you just tell me whats wrong with it or write me a new one (Since what im asking for so far is very short). Any help is greatly appreciated. Thanks
Oh, and here is a the compile log if its needed:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Temp\azbac.cpp" -o "C:\Temp\azbac.exe" -g3 -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
C:/Temp/azbac.cpp: In function `int main()':
C:/Temp/azbac.cpp:8: parse error before `;' token
C:/Temp/azbac.cpp:9: parse error before `;' token
C:/Temp/azbac.cpp:10: parse error before `;' token
C:/Temp/azbac.cpp:11: parse error before `;' token
C:/Temp/azbac.cpp:12: parse error before `;' token
C:/Temp/azbac.cpp:13: parse error before `;' token
Execution terminated
#include <iostream> // I am not sure if these
#include <iomanip> // 3 files our needed
#include <cstdio> // to run program (This is not full program)
using namespace std; // CLS needed to avoid std::cout and std::cin
int main ()
{
int calc_choice;
using namespace std;
cout << "Welcome to Azbac's program of Everquest Calculators!\n"; // CLS you had << ; that is a no-no
cout << "All results are an average from information i have found\n"; // CLS use either '\n' or "\n" or endl
cout << "And may not be 100% Correct\n"; // CLS for new-line...
cout << endl;
cout << "********************************************************\n";
cout << endl;
cout << "For Mana Calculator type " << "1 " << "followed by enter\n";
cout << "For Haste/Delay Calculator type " << "2 " << "followd by enter\n";
cout << "Choice: ";
cin >> calc_choice ;
return 0;
}
Curtis