Oh I re-read your post and I get it... ya.. did you learn ofstream yet?
Type: Posts; User: IKnew
Oh I re-read your post and I get it... ya.. did you learn ofstream yet?
Thanks. is there a way to limit the number of zeros to the needed length? like...
double a = 5;
cout<<fixed<<a<<endl;
would print out something like...
5.0000000000
when simple 5 or 5.0...
I would like to know how to print double variable if it is assigned a number with alot of digits.
For example, if i were to cout<<(double)100000000<<endl i would get printed "1e+008" printed out....
no idea what that is...
i dont think i covered any of that in my book.
err, whats the point of that?
edit:
yeah i saw that so i changed it. hehe
i didnt understand what you mean by that... sorry :(
hurray! thanks alot! forgot that the getline takes 2 parathesis. soo much to remember...
final code,
#include <iostream>
#include <fstream>
using namespace std;
13 C:\Documents and Settings\Simon\My Documents\Untitled1.cpp no matching function for call to `std::basic_istream<char, std::char_traits<char> >::getline(char[80])'
lol mistyped it, but i am still getting the error tho even after i fixed it...
thx! that solved everything except the cin.getline problem...
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
new code... hmm, i still getting the getline error, and i am also getting
27 C:\Documents and Settings\Simon\My Documents\Untitled1.cpp continue statement not within a loop
the continue, is...
Hi! i am sorta new to this forum, but i have a problem with my code/compiler. i dont know if it is the compiler's fault or mine. I am self taught and learning from the book "SAMS teach yourself C++...
You can make this cleaner by using switch/cases.
switch(varible)
{
case #: (arguement)
break;
}
there should be a check for if the start cell is bigger then or equal to 5 after it adds.
suggest u put something like
int check;
check=i+startcell;
if (prisonerlocked[i + startcell] ==...