Home > Back-end >  C the couple for help
C the couple for help

Time:03-05

As is known to all, c + + has a call int main (), in this into your own code, open the program is executed, but if to int main1 ()?
How can be performed in the main printf (" a ") and then execute the main1 printf (" b ")?
The following is a code
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# include & lt; Iostream>
Using namespcae STD.
Int main () {
Printf (" a ");
}
Int main1 () {
Printf (" b ");
}
----------------------------------------------------------------

CodePudding user response:

 
# include & lt; Iostream>
Using namespcae STD.
Int main () {
Printf (" a ");
The main1 ();
return 0;
}
Int main1 () {
Printf (" b ");
return 0;
}

There are two things to note: first, the main1 and main is different, is the main function of the entrance, main1 is just an ordinary function, like printf; Second, it is best to output a cout
  • Related