Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is the code line in which i get error....

temp = word(word, line_no);
the error is:
call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type


the prototype of word function is :

string word(string wor, int line)
Posted

You are passing the variable word to a function with the same name. The compiler does not use the variable here but tries to pass the function as argument.

Solution: Rename the variable.
 
Share this answer
 
Quote:
temp = word(word, line_no);
You did choose a unfortunate name for the function's first parameter.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900