Announcement

Collapse
No announcement yet.

Getting pointer to custom made class

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting pointer to custom made class

    Hi there.
    I want to create a pointer to a custom made subclass from PlayerController named CharaPlayerController from my custom character class.

    Here's the code I'm trying to use from my character class:
    Code:
    ACharaPlayerController* const PC = CastChecked<ACharaPlayerController>(Controller);
    However, the compiler says that "ACharaPlayerController" does not exist. (The definition. The part inside CastChecked gives no problem.)

    So, what am I doing wrong?

    Thanks in advance for the answers!
    Last edited by Keytotruth; 01-23-2015, 02:59 PM.

    #2
    Did you include the header file which defines your class?

    Comment


      #3
      Originally posted by Slayemin View Post
      Did you include the header file which defines your class?
      Yeah. I feel so stupid right now.
      I just needed to add the header to the new class I created.

      Thanks. You guys can close the thread now.

      Comment

      Working...
      X