Home > Back-end >  Inside the main function can't be defined function, how should that do
Inside the main function can't be defined function, how should that do

Time:10-03

How should this change, turn to the great god

CodePudding user response:

Show it in a word, I only said once
Class member functions are to run into the main function definition

CodePudding user response:

The definition in the outside, but also not line, I tried

CodePudding user response:

The code posted, don't post pictures

CodePudding user response:

You could look at the example of books

For example, A is the name of the class, then Show outside the class definition should be similar to the following forms: don't need A virtual keyword, need to define A class name: :
Void A: : Show () const
{
//your code
}

CodePudding user response:

C + + function can be written as lambda expressions, should be a c + + 11 features
  • Related