Question: C++ Error Question: error C2440: 'return': cannot convert from 'int' to 'int *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or

C++ Error Question:

error C2440: 'return': cannot convert from 'int' to 'int *'

Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast

The cause of the issue is in one of my header(.h) files, in my getter statements, where I have defined int *GetdaysInCourse();

string GetstudentID(); string GetfirstName(); string GetlastName(); string GetemailAddress(); int Getage(); int* GetdaysInCourse(); //the * is pointing to an interger array string Getdegreeprogram()

Later... in the .cpp file, I the statements:

int* GetdaysInCourse() { return int ();

I can't figure out how to correct this so that I will stop getting the error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!