Search This Blog

Wednesday, December 26, 2012

Inline Functions in C++

Example Inline Function

#include 

using namespace std;

inline void hello()
{ 
  cout<<"hello";
}
int main()
{
  hello(); //Call it like a normal function...
  cin.get();
}
However, once the program is compiled, the call to hello(); will be replaced by the code making up the function.

Is cin a function or object in c?

cin is an object........
An Example is
#include
using namespace std;
int main(){
int age;


cout << "How Old Are You?\n";
cin >> age;
cout << "You are << age << years old\n";

system("pause")

return 0;
}