You are not logged in. Please login at www.codechef.com to post your questions!

×

Form a string using chars with the .push_back() function with white spaces

How can I have a program read a set number of characters (including white-spaces) then form a string with said characters using the .push_back() function?

asked 04 Feb, 05:20

nick231's gravatar image

0★nick231
1
accept rate: 0%


Problem with input? If yes, u can input chars, while your char not equal to EOF or something else(how u want), and just push_back into string, if my answer not for u, describe your problem more concretely pls, attach your code, input/output.

link

answered 04 Feb, 14:03

kirillpt's gravatar image

2★kirillpt
262
accept rate: 50%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,918
×354
×2

question asked: 04 Feb, 05:20

question was seen: 59 times

last updated: 04 Feb, 14:03