Problems splitting imported file into int array
in
Programming Questions
•
2 years ago
I am trying to import a data file into a int array. Here is the data in the file
99.72,100.74
98.71,100.74
99.72,100.85
100.29,101.3
I get the error cannot invoke split(String) on the array type String[]
The file is in data folder in sketch location.
If it matters I am using processeing 1.5
What am I doing wrong???
Here is my code
99.72,100.74
98.71,100.74
99.72,100.85
100.29,101.3
I get the error cannot invoke split(String) on the array type String[]
The file is in data folder in sketch location.
If it matters I am using processeing 1.5
What am I doing wrong???
Here is my code
- void setup()
{
size(400, 400);
background(105);
}
void draw() {
String [] lines = loadStrings("TestLiveGraph2.txt");
int new2[] = int(lines.split(","));
println(new2);
}
1