Wrong assignment?

Sep 17, 2013 at 2:49pm
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!
Sep 17, 2013 at 3:00pm
Didnt you mean tagList.tag; on line 3
Sep 17, 2013 at 3:03pm
error, which i dont know why
On line 3:tagList.top is the pointer to the function. you mean tagList.top()
Sep 17, 2013 at 3:07pm
Thank coder777, forgot that :))
Topic archived. No new replies allowed.