x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

new interface: include not found / base class undefined

Hey guys! i created a simple new interface ( following the tutorial in the wiki ). but i can not inherit from it. the compiler cannot find the include file "Usable.h" Every source file is in the MyGame directory. If i omit the include, the base class if undefined. i also tried to predeclarate it, but with no success. whats wrong?

 // Usable.cpp
 #pragma once
 #include "Usable.generated.h"
 
 UINTERFACE(MinimalAPI)
 class UUsable :public UInterface
 {
     GENERATED_UINTERFACE_BODY()
 };
 
 class IUsable
 {
     GENERATED_IINTERFACE_BODY()
     virtual void OnUsed(AController * user);
 };
 
 // Usable.cpp
 #include "MyGame.h"
 
 
 UUsable::UUsable(const class FPostConstructInitializeProperties& PCIP)
 : Super(PCIP)
 {
 
 }
 
 void IUsable::OnUsed(AController * user)
 {
 
 }
 
 // Crate.h
 #pragma once
 #include "Usable.h"
 #include "Crate.generated.h"
 
 UCLASS()
 class ACrate : public AActor, public IUsable
 {
     GENERATED_UCLASS_BODY()
 
     virtual void OnUsed(AController* c) OVERRIDE;
 };
 
 

Product Version: Not Selected
Tags:
more ▼

asked Apr 09 '14 at 11:47 PM in C++ Programming

avatar image

dimatosaurus
26 2 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Solved it. The files were in the wrong directory. Hint to myself: If you create files in Visual Studio, make sure they are created in the right directory!

more ▼

answered Apr 10 '14 at 04:40 PM

avatar image

dimatosaurus
26 2 2 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question