Wrong assignment?
I'm implementing a function like this
1 2 3 4 5 6
|
int processTag(string tag, stack<string> tagList)
{
string top = tagList.top; //error, which i dont know why
//some other code
}
|
and this is what i got from compiler (Code::Block IDE):
error: conversion from '<unresolved overloaded function type>' to non-scalar type 'std::string {aka std::basic_string<char>}' requested|
Please help me correct my code, thank much!
Didnt you mean tagList.tag; on line 3
error, which i dont know why |
On line 3:
tagList.top
is the pointer to the function. you mean
tagList.top()
Thank coder777, forgot that :))
Topic archived. No new replies allowed.