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"

Compilation Problem

Hello all! I use VisualStudio2015 and UE4.10 When i try compile code i have many errors like:

 1>***n.cpp(463): error C2065: 'ss': undeclared identifier
 1>***n.cpp(464): error C2065: 'cc': undeclared identifier
 1>***n.cpp(468): error C2065: 'M': undeclared identifier
 1>***n.cpp(469): error C2065: 'M': undeclared identifier
 1>***n.cpp(481): error C2065: 'NF': undeclared identifier
 ...
 1>***n.cpp(493): error C2988: unrecognizable template declaration/definition

But in ***n.cpp file i have:

 void classn::calc(const FGregDate& J, double* rect){
     ...
     double M;
     double NF;
     ...
     TArray<TArray<double>> ss;
     TArray<TArray<double>> cc;
     ...
     for(int8 i = 0; i < 5; ++i){
         ss[i].AddDefaulted(8);     // Line 463
         cc[i].AddDefaulted(8);     // Line 464
     }
     ...
     M = mods3600(129596581.038354 * T); // Line 468
     M += 1287104.76154; // Line 469
     ...
     NF = mods3600(1739527263.0983 * T); // Line 481
     ...
     LP += (((((z[23] * T + z[22])*T + z[21])*T + z[20])*T + z[19])*T + z[18])*f; // Line 493 (T - double, z - double[])

But before this code compile without errors... before added to my template class one methods. My template class not including ***n.h. I tried cleaning. It did not help.

UPD: I removed the new methods but it did not help.

P.S. Sorry for bad English skills ;)

Product Version: UE 4.10
Tags:
more ▼

asked Nov 17 '15 at 12:56 PM in C++ Programming

avatar image

OlexandrI
40 6 5 8

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

2 answers: sort voted first

Did you implement your templated function correctly? Templated functions can be quite tricky. Here is a great page that will help you understand them a bit better. Personally, I like to just inline my templated functions in the header.

more ▼

answered Nov 17 '15 at 03:45 PM

avatar image

MJ_01
822 38 39 240

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

After remove template class all is ok. But why? Template class not include n.h and .h/.cpp not include template class.

more ▼

answered Nov 17 '15 at 01:34 PM

avatar image

OlexandrI
40 6 5 8

(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