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. 

[4.7] I can't still add more than one Unreal classes in single C++ header.

following C++ improvements from 4.7 are not still working.

  • You can now have more than one Unreal class in a single C++ header file

  • You no longer are required to name your source file the same as your Unreal class name.


Case 1

 // in PFBattleGameMode.h
 
 UCLASS()
 class PFCLIENT_API APFBattleGameMode : public APFGameModeBase
 {
     GENERATED_BODY()
 };

 UCLASS()
 class PFCLIENT_API UTestAdditionalClass : public UObject
 {
     GENERATED_BODY()
 };

1> Parsing headers for PFClientEditor

1> C:/workspace/dochigun-pc/PFClient/Source/PFClient/Classes/PFBattleGameMode.h(128): error : In PFBattleGameMode: Can only declare one class per file (two for an interface)


Case 2

 // in PFBattleGameMode.h

 UCLASS()
 class PFCLIENT_API UTestAdditionalClass : public UObject
 {
     GENERATED_BODY()
 };
 
 UCLASS()
 class PFCLIENT_API APFBattleGameMode : public APFGameModeBase
 {
     GENERATED_BODY()
 };

1> Parsing headers for PFClientEditor

1> C:/workspace/dochigun-pc/PFClient/Source/PFClient/Classes/PFBattleGameMode.h(68): error : Invalid class name 'UTestAdditionalClass'. The class name must match the name of the class header file it is contained in ('PFBattleGameMode'), with an appropriate prefix added (A for Actors, U for other classes)

Product Version: Not Selected
Tags:
more ▼

asked Feb 27 '15 at 03:18 AM in C++ Programming

avatar image

JakeChoe
26 2 3 6

avatar image Dec1234 Feb 28 '15 at 04:57 PM

Getting the same issue on 4.7.1:

 error : Invalid class name 'UTestClass_Base'. The class name must match the name of the class header file it is contained in ('TestClasses'), with an appropriate prefix added (A for Actors, U for other classes)
avatar image Raikoh Mar 01 '15 at 04:01 PM

Same here :(

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

1 answer: sort voted first

Hi guys, sorry for the confusion, but the change haven't made it to the 4.7. It will be in 4.8.

We're investigating why it was included in the release notes.

Thanks, Jarek

more ▼

answered Mar 02 '15 at 01:46 PM

avatar image Dec1234 Mar 02 '15 at 02:26 PM

Thanks for the reply Jarek, just good to know that I wasn't doing something wrong haha.

(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