movie.cpp: In member function ‘void movie::menu(int, movie*)’: movie.cpp:57: error: expected primary-expression before ‘*’ token movie.cpp: In member function ‘void movie::enter_movie(movie*)’: movie.cpp:68: error: expected primary-expression before ‘name’ movie.cpp:69: error: expected primary-expression before ‘int’ movie.cpp:70: error: expected primary-expression before ‘int’ movie.cpp:71: error: expected primary-expression before ‘*’ token movie.cpp:72: error: expected primary-expression before ‘rating’ movie.cpp:73: error: expected primary-expression before ‘int’ main.cpp: In function ‘int main()’: main.cpp:29: error: expected primary-expression before ‘int’ main.cpp:29: error: expected primary-expression before ‘*’ token main.cpp:29: error: expected primary-expression before ‘)’ token |
|
|
|
|
|
|
movie * is from the movie class being a private member of another class. I'm guessing I shouldn't be using it like this although I was told today that I should. I don't know, I barely know what I'm doing. But if I could get some assistance with these errors I'll be eternally grateful. :)
|
|
|
|
|
|
|
|
movie.cpp:42: error: variable or field ‘menu’ declared void |
void movie::enter_movie( movie ). It wouldn't let me take it out or it got mad at me. I don't really know why I need the number in the two function calls to get rid of so many errors. I tried just declaring the function in the class without any parameters at all since I was asking for the number inside the function but it got mad at me for that too. Feels like c++ is just out to get me. I do things that seem logical to me but the compiler blows up overtime I try something. Anyways, any clues on that last error? :)
| It wouldn't let me take it out or it got mad at me. I don't really know why I need the number in the two function calls to get rid of so many errors. |
|
|
|
|
|
|
|
|
|
|
movie.cpp:42: error: variable or field ‘menu’ declared void |
|
|
|
|
In file included from ./netflix.h:18,
from netflix.cpp:15:
././movie.h:28: error: ISO C++ forbids declaration of ‘vector’ with no type
././movie.h:28: error: expected ‘;’ before ‘<’ token
In file included from netflix.cpp:15:
./netflix.h:25: error: ISO C++ forbids declaration of ‘vector’ with no type
./netflix.h:25: error: expected ‘;’ before ‘<’ token
netflix.cpp: In constructor ‘netflix::netflix()’:
netflix.cpp:25: error: ‘m’ was not declared in this scope
netflix.cpp: In destructor ‘netflix::~netflix()’:
netflix.cpp:33: error: ‘m’ was not declared in this scope
netflix.cpp: At global scope:
netflix.cpp:40: error: prototype for ‘void netflix::set_movie()’ does not match any in class ‘netflix’
./netflix.h:33: error: candidate is: void netflix::set_movie(movie*)
netflix.cpp: In member function ‘movie netflix::get_movie()’:
netflix.cpp:44: error: ‘m’ was not declared in this scope
In file included from movie.cpp:15:
./movie.h:28: error: ISO C++ forbids declaration of ‘vector’ with no type
./movie.h:28: error: expected ‘;’ before ‘<’ token
movie.cpp: In constructor ‘movie::movie()’:
movie.cpp:27: error: ‘cast’ was not declared in this scope
movie.cpp: In destructor ‘movie::~movie()’:
movie.cpp:35: error: ‘cast’ was not declared in this scope
movie.cpp: At global scope:
movie.cpp:42: error: prototype for ‘void movie::menu()’ does not match any in class ‘movie’
./movie.h:37: error: candidate is: void movie::menu(int)
movie.cpp:67: error: prototype for ‘void movie::enter_movie()’ does not match any in class ‘movie’
./movie.h:38: error: candidate is: void movie::enter_movie(movie)
movie.cpp:79: error: prototype for ‘void movie::set_name()’ does not match any in class ‘movie’
./movie.h:39: error: candidate is: void movie::set_name(std::string)
movie.cpp:87: error: prototype for ‘void movie::set_stars()’ does not match any in class ‘movie’
./movie.h:40: error: candidate is: void movie::set_stars(int)
movie.cpp:95: error: prototype for ‘void movie::set_num_cast()’ does not match any in class ‘movie’
./movie.h:41: error: candidate is: void movie::set_num_cast(int)
movie.cpp:103: error: prototype for ‘void movie::set_cast()’ does not match any in class ‘movie’
./movie.h:42: error: candidate is: void movie::set_cast(std::string*)
movie.cpp:119: error: prototype for ‘void movie::set_rating()’ does not match any in class ‘movie’
./movie.h:43: error: candidate is: void movie::set_rating(std::string)
movie.cpp:127: error: prototype for ‘void movie::set_copies()’ does not match any in class ‘movie’
./movie.h:44: error: candidate is: void movie::set_copies(int)
movie.cpp: In member function ‘std::string movie::get_cast()’:
movie.cpp:138: error: ‘cast’ was not declared in this scope
In file included from ./netflix.h:18,
from main.cpp:15:
././movie.h:28: error: ISO C++ forbids declaration of ‘vector’ with no type
././movie.h:28: error: expected ‘;’ before ‘<’ token
In file included from main.cpp:15:
./netflix.h:25: error: ISO C++ forbids declaration of ‘vector’ with no type
./netflix.h:25: error: expected ‘;’ before ‘<’ token
main.cpp: In function ‘int main()’:
main.cpp:29: error: no matching function for call to ‘movie::menu()’
././movie.h:37: note: candidates are: void movie::menu(int)
|
#include <vector> . Other than that, not sure.