User Profile

Collapse

Profile Sidebar

Collapse
szidijani
szidijani
Last Activity: Nov 15 '10, 05:12 PM
Joined: Nov 15 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • szidijani
    replied to operator[] does not work
    in C
    Thanks, I fixed it...but I still have problem with it.
    I run it, and it says:

    v\Adatszerk\las su_rendezesek\L assu_rendezesek _hallgatoi\main .cpp||In function `int main()':|
    v\Adatszerk\las su_rendezesek\L assu_rendezesek _hallgatoi\main .cpp|26|error: no match for 'operator<<' in 'std::cout << *(tmp + 48u)'|

    However, I wrote that operator.
    See more | Go to post

    Leave a comment:


  • szidijani
    started a topic operator[] does not work
    in C

    operator[] does not work

    Hello!

    I have a homework for tomorrow, and I simply can't solve it.
    I have a list (with template) class, I wrote and it has an operator:

    Code:
    T& operator[](int i)
        {
            ToFirst();
            for(int j=0;j<i;j++)
            {
                StepForward();
            }
            return Act->value;
        }
    For using the elements with indexes.
    And I've...
    See more | Go to post
    Last edited by Markus; Nov 16 '10, 01:00 PM. Reason: Added [code] tags, undeleted thread and moved it to /c/answers/
No activity results to display
Show More
Working...