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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started