User Profile

Collapse

Profile Sidebar

Collapse
brucedd
brucedd
Last Activity: Mar 2 '08, 04:01 PM
Joined: Mar 1 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Oh, of course you are right about that. I'll need to find another way to do this because when I originally tried writing the class _A so the constructor took an int as an argument the compiler didn't like that either:

    class foo {
    foo() {};
    ~foo() {};

    A m(c);

    }
    See more | Go to post

    Leave a comment:


  • brucedd
    started a topic error: ISO C++ forbids declaration of 'm' with no type
    in C

    error: ISO C++ forbids declaration of 'm' with no type

    I suspect I don't understand namespaces or something, but does anyone have an idea of why the following code segment which is all in a single *.h file causes a compile error?

    namespace first {
    typedef class _A {
    public:
    _A() {};
    ~_A() {};
    void set(int c) {b = c;};
    int b;
    } A;
    } //end namespace first

    namespace first {
    namespace second {
    namespace third ...
    See more | Go to post
No activity results to display
Show More
Working...