My C++ code compiles and runs, but no output is printed to the console. I think it has something to do with the string variables, but im not sure. Im a total noob, any help would be appreciated. I am using codeblocks with GNU GCC Compiler.
#include <iostream>
#include <string>
using namespace std;
int main()
{
string botlong, botshort, secondline;
botlong = "bottles of beer on the wall,";
botshort = "bottles of beer";
secondline = "Take one down and pass it around,";
for(int bottles = 99; bottles<=0; bottles--)
{
cout<<bottles <<botlong <<bottles <<botshort;
for(int lostB = 98; lostB<=0; lostB--)
{
cout<<secondline<<lostB<<botlong;
}
}
return 0;
};
endlin order to see some results ?flushthe stream (or any stream for that matter) before the program ends.