Value of words? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Value of words?

Hey everyone! I just recently started learning C++ and writing my own codes! I was simply wondering, is the value of letters in and integer variable always zero? And is there a way to code that I can check to see that? Thanks! Edit:: I guess what I’m asking is this: if you type words into a integer variable, will it return 0?

18th Sep 2018, 10:14 AM
Tyler Y
3 Answers
+ 3
Can you describe more what you are trying to ask?
18th Sep 2018, 1:37 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 2
if you try and store a string into an int, it won't work: int a = "test"; would not compile
19th Sep 2018, 2:02 AM
J.G.
J.G. - avatar
+ 1
You mean something like this? an int value for each char? or something else? https://code.sololearn.com/cYTW1YxqJkJD/?ref=app
18th Sep 2018, 10:26 AM
J.G.
J.G. - avatar