Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7656833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:52:15+00:00 2026-05-31T12:52:15+00:00

I am getting a very confusing compiler error when building the following test code.

  • 0

I am getting a very confusing compiler error when building the following test code.

f:\data\sdks\smctc-1.00\examples\ik_pf\msvc\MarkerSampler.inl(16): error C2143: syntax error : missing ';' before 'MarkerSampler<MarkerT>::sample2'
f:\data\sdks\smctc-1.00\examples\ik_pf\msvc\MarkerSampler.inl(16): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Note sample builds without error, but sample2 is causing the problem. The only difference being one explicitly details the return type without the use of a typedef and the other uses the typdef’ed version.

.h file

#pragma once
#ifndef __MARKERSAMPLER_H_INCLUDED__
#define __MARKERSAMPLER_H_INCLUDED__

#include <vector>
#include <string>

#include <qthread.h>

#include <Wm5Vector3.h>
#include "UtilityFunctions.h"
#include "Marker.h"
#include "MarkerSet.h"

template <class MarkerT>
class MarkerSampler : public QThread
{


  typedef std::vector<MarkerT> MarkerVector ;
  typedef MarkerSet<MarkerT> MarkerSetT ;
  typedef std::vector<MarkerSetT> MarkerSetVector ;

public :

 MarkerSampler(const std::string inputDataDirectory, const unsigned int nSamples, const unsigned int startFrame, const unsigned int nFramesToUse) : 
    inputDataDirectory_(inputDataDirectory), nSamples_(nSamples), startFrame_(startFrame), nFramesToUse_(nFramesToUse) {seed = -time(NULL) ;}

 ~MarkerSampler() {}

 std::vector<MarkerSet<MarkerT> > sample(const double scaleFactor = 1.0, const double noiseSD = 0.0) ;

 MarkerSetVector sample2(const double scaleFactor = 1.0, const double noiseSD = 0.0) ;

protected:
 void run();

private:

 int seed ;

 const std::string inputDataDirectory_ ;
 const unsigned int nSamples_ ;
 const unsigned int startFrame_ ;
 const unsigned int nFramesToUse_ ;


} ;

 #include "MarkerSampler.inl"

#endif

.inl file

template <class MarkerT>
std::vector<MarkerSet<MarkerT> > MarkerSampler<MarkerT>::sample(const double scaleFactor, const double noiseSD)
{
....
}

template <class MarkerT>
MarkerSetVector MarkerSampler<MarkerT>::sample2(const double scaleFactor, const double noiseSD)
{
....
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:52:16+00:00Added an answer on May 31, 2026 at 12:52 pm

    The missing ; part of that error is slightly misleading, the compiler actually just doesn’t recognize the MarkerSetVector type. I think this is because it’s typedef’d inside the MarkerSampler class.

    If you explicitly state the scope of the typedef it should fix the error. Though (depending on your compiler at least) you may also need to add in the typename keyword, since MarkerSetVector is a dependant type. Here’s a fixed example:

    template <class MarkerT>
    typename MarkerSampler< MarkerT >::MarkerSetVector MarkerSampler<MarkerT>::sample2(const double scaleFactor, const double noiseSD)
    {
    ....
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting a very non specific error when trying to connect to SQL
I am getting this error but only very occasionally. 99.9% of the time it
I'm getting the following error when including static libraries: missing required architecture i386 in
We are getting very slow compile times, which can take upwards of 20+ minutes
I am getting very frustrated because I cannot seem to figure out why Collections
After doing a project with WPF and getting very much attached to it's excellent
I notice that I am getting very poor performance for either or both inserts
I'm getting a very weird exception when trying to deploy my app on JBOSS
I'm getting a very peculiar problem with my asp.net application, it took me an
I'm pulling my hair out with something that should be very simple: getting line

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.