Home > Back-end >  A great god help couldn't see how to read the code?
A great god help couldn't see how to read the code?

Time:09-27

CodePudding user response:

There are three red from your code's start wave number
The first wave number: switch. H this header file does not exist, should be the custom header files, to put the header file into your projects;
The second wave number: print to print f
The third wave number: resuit into the result

CodePudding user response:

A great god, and free with me this bronze

CodePudding user response:

reference 1st floor MianHou response:
from your code's start has three red wave number
The first wave number: switch. H this header file does not exist, should be the custom header files, to put the header file into your projects;
The second wave number: print to print f
The third wave number: resuit into result

How to put this file to import that in the past?

CodePudding user response:

The
reference 3 floor kittens... Without sleep response:
Quote: refer to 1st floor MianHou response:
from your code's start has three red wave number
The first wave number: switch. H this header file does not exist, should be the custom header files, to put the header file into your projects;
The second wave number: print to print f
The third wave number: resuit into result

How to put this file to import that in the past?

You must have this switch. H header file, to import

CodePudding user response:

This file is found that from there?

CodePudding user response:

Look at your code, however, should not use this header file, can be added//in front of the include, the code is commented out
//include & lt; The switch. H> 

CodePudding user response:

Commented out, after an error occurs, or won't start!

CodePudding user response:

Copy the code up, don't send photos, copy and paste directly,

CodePudding user response:

refer to the eighth floor MianHou response:
copy the code to go up, don't send photos, copy and paste directly,

#include
#include
# define Height 10
Int calculate (int, long, int width);
Int main ()
{
Int m_Long;
Int m_width;
Int result;
Printf (" the Height of the rectangle is: % d \ n ", Height);
Printf (" please enter the length \ n ");
The scanf (" % d ", & amp; M_Long);
Printf (" please input the width ");
The scanf (" % d \ n ", m_width);
Result=calculate (m_Long m_width);
Printf (" the volume of a cuboid is: ");
Printf (" % d \ n ", result);
return 0;
}
Int calculate (int, Long, int Width)
{
Int result=Long * Width * Height;
return result;
}

CodePudding user response:

I have modified the code, you compared to see
//# include 
#include
# define Height 10
Int calculate (int, Long, int width);
Int main ()
{
Int m_Long;
Int m_width=0;
Int result;
Printf (" the Height of the rectangle is: % d \ n ", Height);
Printf (" please enter the length \ n ");
The scanf (" % d ", & amp; M_Long);
Printf (" please enter width \ n ");
The scanf (" % d ", & amp; M_width);
Result=calculate (m_Long m_width);
Printf (" the volume of a cuboid is: ");
Printf (" % d \ n ", result);
return 0;
}
Int calculate (int, Long, int Width)
{
Int result=Long * Width * Height;
return result;
}

C + + environment debugging VS2015

CodePudding user response:

In this case, the header file is how to return a responsibility?

CodePudding user response:

Don't I this is 2019, general?

CodePudding user response:

The
11 references kitten... Without sleep response:
in this case, the header file is how to return a responsibility?

The header file should be useless, VS2019 should be ok

CodePudding user response:

I read your error message, it should be the scanf () function, in VS2015 and VS2019, using scanf_s (), namely the security version, if you want to continue to use the scanf (), please refer to the
"VS2015 used in the scanf () is not an error setting method"
Wish I could help you!

CodePudding user response:

% d there can be no Spaces in the middle
  • Related