Hi... Im a noob...
I just copied that into my file thing, and I have no idea what it does...
but thats not the problem
2 things
1: I need a good tutorial to learn C++ off
2: the variable "result" isnt showing and I dont know how to edit the code below to make it show
(I added the stuff involving the variables, a,b, result)
please help me...
Code:
#include <ios> // Required for streamsize
#include <iostream>
#include <istream>
#include <limits> // Required for numeric_limits
using namespace std;
void myflush ( std::istream& in )
{
in.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );
in.clear();
}
void mypause()
{
std::cin.get();
}
int main()
{
int number;
int a, b;
int result;
a=5;
b=2;
a=a+1;
result=a-b;
std::cout << result; (<<< this line causes it not to pause so I can see what I did)
return 0;
// Test with an empty stream
std::cout<<"Hello, world!\n" ;
mypause();
// Leave extra input in the stream
myflush ( std::cin );
mypause();
std::cin.get();
}