Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //pre-processor directive
- using namespace std; //std library
- void printSomething(); //prototype a function so that the function is called 1st
- int main() //it starts with the main 1st
- {
- printSomething();
- return 0; //to tell that program ran fine
- }
- void printSomething(){ //function
- cout<< "text on screen" <<endl;
- }
- //C++ works from top to bottom so unless the function is called 1st or there is a function prototypr before main, the program would not run properly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement