Can somebody please tell me what the problem is with writing such a code?
c is a double and v is a vector.
both lines are incorrect. In the first line it draws a red line under "c" and in the second, under "-" giving the following error:Code:v.push_back(c%10); c=-c%10;
expression must have integral or enum type.
I have another question. somewhere in my program I have written:
where b is an object of a defined class and num, a vector. my intention is to erase the first element of this vector but I encounter an error saying: no instance of overloaded function...matches the argument list(the object has type qualifiers that prevents the match)Code:b.num.erase(b.num.begin());
too few arguments in function call.
what's wrong with that?