+ 1
Invalid character constant
Hello, I have a Code in that there is a variable called loesung. I want so set this variable to ".-". But it doesnt work. Can somebody help me? Thank you! char loesung = '.-';
4 Answers
+ 12
Becz char type veriable does not contain two characters.
Use String
String loesung = ".-";
+ 13
Keep in mind that whenever you use the A string variable, keep any character inside the double quto like this ("hello")
+ 3
With String i have the same Error.
+ 3
use String or try a char array :
char []c={'.','-'};
System.out.print(c[0]+""+c[1]);
Hot today
Python — File Handling
2 Votes
Help me
0 Votes
What’s wrong?
2 Votes
Question is write a c program to print prime numbers up to n and print the largest number in array.
1 Votes
Achievements on Sololearn
1 Votes
How to draw in the console?
0 Votes