Here is my code:
What I want it to do is do the Print_Out function, thus printing out the Test on the screen as well as assigning b to 2. Then how would I call up the Check(int b) function to test if b is less than or greater than 5?Code:#include <iostream> #include <string> using namespace std; string Print_Out(); string Check(); string secret; int main() { Print_Out(); Check(int b); return 0; } string Print_Out() { int b; cout << "Test" << endl; b = 2; return secret; } string Check(int b) { if (5>b) { cout << "5 Is greater than 2" << endl; } else { cout <<"5 is not greater than 2" << endl; } return 0; }
I am very confused as to how to put these functions into the int main();
When I run the program, it seems as though the Print_Out() works fine printing out Test on the screen but it does not output whether 5 is greater than or less than 2. Please help me with this. Thank you.



LinkBack URL
About LinkBacks



