string stream question

This is a discussion on string stream question within the C++ Programming forums, part of the General Programming Boards category; would this work, stringstream(a,b)>> c >> d; allowing you to do multiple at once?...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    4

    string stream question

    would this work, stringstream(a,b)>> c >> d;

    allowing you to do multiple at once?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    how much time have you spent to check it?
    Code:
    #include <sstream>
    int main()
    {
    	int a, b;
    	std::stringstream my ("1 2 3 4 5");
    	my >> a >> b;
    
    	return 0;
    }
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    4
    i could have checked that but i couldnt compile b4

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 10:03 PM
  2. Program using classes - keeps crashing
    By webren in forum C++ Programming
    Replies: 4
    Last Post: 09-16-2005, 03:58 PM
  3. Another overloading "<<" problem
    By alphaoide in forum C++ Programming
    Replies: 18
    Last Post: 09-30-2003, 10:32 AM
  4. Next Question...
    By Azmeos in forum C++ Programming
    Replies: 3
    Last Post: 06-06-2003, 02:40 PM
  5. lvp string...
    By Magma in forum C++ Programming
    Replies: 4
    Last Post: 02-26-2003, 11:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21