Pages: [1]   Go Down
Author Topic: 0019 new Software. Problem with String Object  (Read 896 times)
0 Members and 1 Guest are viewing this topic.
Germany, Osnabrück
Offline Offline
God Member
*****
Karma: 30
Posts: 654
E-Technik Student - Master
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

i use the new arduino 0019 software with the String object and have problems:

Code:
Code:
 #include <String.h>
  
  String stringOne = "<HTML><HEAD><BODY>";

I get this error:
'String' does not name a type

Can somebody help me ?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Strings are built into 0019. There is no need to include a library.

Without the #include statement, your code compiled fine.
Logged

Germany, Osnabrück
Offline Offline
God Member
*****
Karma: 30
Posts: 654
E-Technik Student - Master
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm,

it is not working.

I create a new sektch with this content
Code:
void setup() {  
  String stringOne = "<HTML><HEAD><BODY>";
}

void loop() {  
}

and i get this message:
sketch_sep07a.cpp: In function 'void setup()':
sketch_sep07a:4: error: 'String' was not declared in this scope
sketch_sep07a:4: error: expected `;' before 'stringOne'


software: Arduino 0019 newest version
OS:  Windows xp sp3




Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Same OS. Same version of IDE. Same sketch.

Binary sketch size: 1174 bytes (of a 30720 byte maximum)


I'd try re-installing 0019.
Logged

Germany, Osnabrück
Offline Offline
God Member
*****
Karma: 30
Posts: 654
E-Technik Student - Master
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok,  i found the bug.

I use sanguino as hardware. This packet is not up to date :-)
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49365
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This packet is not up to date
What does this mean? What packet?
Logged

Germany, Osnabrück
Offline Offline
God Member
*****
Karma: 30
Posts: 654
E-Technik Student - Master
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sanguino software does not include wstring. I have to include this file.
Logged

Pages: [1]   Go Up
Jump to: