[Stk] using namespace stk

Stephen Sinclair sinclair at music.mcgill.ca
Sat Oct 22 18:30:02 PDT 2011


Which version of STK are you using?  A quick inspection of Noise.h
should tell you whether this error is sane or not.  Is there a line
near the top that says "namespace stk"?

Steve

On Sat, Oct 22, 2011 at 6:38 PM, Nelson Carlos de Sousa Campos
<nelson.campos at ee.ufcg.edu.br> wrote:
> Hi,
> I'm using Visual Studio 2010 and have a problem with namespace. This is my
> code, from tutorial:
> // stk_project.cpp : Defines the entry point for the console application.
> //
> #include "stdafx.h"
> #include "Noise.h"
>
> using namespace stk;
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> StkFloat output;
> Noise noise;
> for(unsigned int i = 0; i < 20; i++){
> output = noise.tick();
> std::cout << "i = " << i << " : output = " << output <<
>         std::endl;
>     }
>   return 0;
> }
> When I try to compile my code, this error appear:
> Error 1 error C2871: 'stk' : a namespace with this name does not exist
> c:\users\nelson\documents\visual studio
> 2010\projects\stk_project\stk_project\stk_project.cpp 7 1 stk_project
> What's happening?
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
>



More information about the Stk mailing list