Pls can sombody me. I created two files named sketch1 and sketch2. Then i declared a variable named 'Resetme' in the namespace called file2 after which i included the sketch2 in sketch1 but when i tried to assign to 'Resetme' under 'using namespace file2;' the ide reports error saying that Resetme doesn't name a type. pls can someone help figure out what is wrong. I attached the pictures to make my point clear. Thanks
Pictures of code are pointless / useless. Please post your code in-line using Code Tags per the Forum Guidelines.
ok i'm sorry for that...i just read the guideline
This is the code in sketch2
namespace file2
{
int Resetme;
}
And this is the code in sketch1
#include"sketch2.h"
using namespace file2;
Resetme = 3;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
And i'm this error message
'Resetme' does not name a type
hope i got it right this time...thanks in advance
Resetme = 3;
Is an assignment statement.
All executable code must be inside a function:
#include"sketch2.h"
using namespace file2;
void setup() {
Resetme = 3;
}
void loop() {
}
gfvalvo:
Resetme = 3;Is an assignment statement.
All executable code must be inside a function:
#include"sketch2.h"
using namespace file2;
void setup() {
Resetme = 3;
}
void loop() {
}
oh my !!!... i didn't take cognizance of this...You are nice person. Thanks a lot