I just read the 3 articles. Honestly it may be a bit over my "experience" because some of the stuff they were talking about was completely greek to me.
But what from I read I should be able to
namespare arr {
do whatever
}
Or just make it static.
Neither of which works of course. I tried it all before I even read that.
The only thing that remotely works is if
1) I DO NOT #include arr.cpp in Form1.h
2) I do this in arr.cpp
1 2 3 4 5
|
using namespace arr;
int calky2() {
Form1 something;
something.Card1Box->Text="test";
|
But it's all for not because I can't use calky2() in Form1.h because I can't #include it. The second I do it immediately starts throwing those errors (acting like it doesn't exist) even though it clearly does.
I'm obviously completely missing something.
But I have no idea what.
This is the errors I get btw if I do #include arr.cpp to Form1.h. Makes absolutely NO SENSE AT ALL to me.
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(13): error C2871: 'arr' : a namespace with this name does not exist
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(17): error C2065: 'Form1' : undeclared identifier
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(17): error C2146: syntax error : missing ';' before identifier 'something'
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(17): error C2065: 'something' : undeclared identifier
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(18): error C2065: 'something' : undeclared identifier
1>c:\users\nmatveev\documents\visual studio 2010\projects\arr\arr\arr.cpp(18): error C2228: left of '.Card1Box' must have class/struct/union