putting color codes into an int Array from File
in
Programming Questions
•
1 month ago
Hello,
I have the following problem with my program
I would like to put color codes into an int array so i can randomise colors inside my program, but i have some difficulty's with it.
I tryed to load the color codes inside an int array with this:
- int[] colorArray = int(loadStrings("colors.txt"));
But then i get an int array with only 0 values, while if i do it with an String Array i get the correct values.
I tryed different ways (loops etc) to try to convert the String Array to an int but nothing seems to work.
for some reason a normal int can accept the value #ADD8E6 for instance, but an array can't it seems.
It really needs to be in an int value couse fill() only accepts those.
could someone assist me with the problem please?
thx in advance.
1