• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
0

how to make input string (-1) into integer -1 in C?

if i input string 100(-1)0, i want to change it into 5 integer, 1,0,0,-1,0

c++data-typesinputcstringbinaryinteger
3rd Nov 2018, 2:11 PM
Yoaraci
Yoaraci - avatar
1 Answer
+ 1
To transform strings into integers, see that link http://www.cplusplus.com/reference/string/stoi/
3rd Nov 2018, 2:50 PM
Théophile
Théophile - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
What to do after finishing Python Developer
3 Votes
New learner
1 Votes
IS POSSIBLE TO PRINT 1 TO 100 WITHOUT FOR LOOP
0 Votes
Slicing
3 Votes
Practice code
1 Votes
Is there a similar app like Sololearn?
1 Votes
Why cant i run the codes in testing and also cannot do the practice. It shows "error" all the time whenever i try
0 Votes
Unknown keywords in C
0 Votes
In html how do you get more than one html documents for more than 1 pages? I’m on iPhone / mobile
3 Votes
Différence in html
0 Votes