Skip to main content
gamedev.net
🔒 Locked

easy compile error question

Started by Nullio Mar 19, 2003 at 11:13 PM 0 replies 150+ views
Original Post
Nullio
Nullio
I have two classes called MyClass1 and MyClass2 in MyClass2 to I have a private memeber: "MyClass1 *test;" I have a function in MyClass2 that looks like this:
int MyClass2::newThinger() {

      this.test = new MyClass2("hello");
      return 1;
}
    
error C2228: left of '.test' must have class/struct/union type whats wrong? [edited by - Nullio on March 19, 2003 12:13:38 AM] [edited by - Nullio on March 19, 2003 12:14:06 AM] [edited by - Nullio on March 19, 2003 12:22:16 AM]
Martee
Martee
Use this->test instead of this.test
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.