Like Tree1Likes
  • 1 Post By Matticus

(ned help with is>> en os<<

This is a discussion on (ned help with is>> en os<< within the C++ Programming forums, part of the General Programming Boards category; Sup, cboard n****s, anyway, i'm kinda stuck again. Im still reading the book accelerated c++, anyway, they explained what is ...

  1. #1
    Registered User
    Join Date
    Dec 2011
    Location
    Eindhoven, Noord-Brabant, Netherlands
    Posts
    54

    (ned help with is>> en os<<

    Sup, cboard n****s,
    anyway, i'm kinda stuck again.
    Im still reading the book accelerated c++, anyway, they explained what is en os is, but when i try to use it in my code, i get the message that they are undeclared.
    this is what I do:
    #include <iostream>
    #include <string>
    int main()
    {
    os << 6;
    is>> 8;
    std::cin.get();
    )
    plus i dont understand how to use this, since it's not explained but only "said'' in the book:
    string s (z,n).
    please explain the above in a code.
    Thank you.

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    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 2011
    Location
    Eindhoven, Noord-Brabant, Netherlands
    Posts
    54
    Quote Originally Posted by Kuro Tensai View Post
    Sup, cboard n****s,
    anyway, i'm kinda stuck again.
    Im still reading the book accelerated c++, anyway, they explained what is en os is, but when i try to use it in my code, i get the message that they are undeclared.
    this is what I do:
    #include <iostream>
    #include <string>
    int main()
    {
    os << 6;
    is>> 8;
    std::cin.get();
    )
    plus i dont understand how to use this, since it's not explained but only "said'' in the book:
    string s (z,n).
    please explain the above in a code.
    Thank you.
    please help me, im tryin to use code tags, but it isn't working, there is somethin wrong with the forum.Can someone please answer my question?
    Last edited by Kuro Tensai; 10-29-2013 at 02:45 PM.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I think the main problem is that you think os and is exist. They might, if you create them; if you don't, they won't.

    You've even got the name of the "real" input stream, cin, right there in your code.

    (Aside: to use code tags you start with [code] and then you paste your code and then you end with [/code] (note the way the slash goes).)

  5. #5
    Registered User
    Join Date
    Dec 2011
    Location
    Eindhoven, Noord-Brabant, Netherlands
    Posts
    54
    Quote Originally Posted by tabstop View Post
    I think the main problem is that you think os and is exist. They might, if you create them; if you don't, they won't.

    You've even got the name of the "real" input stream, cin, right there in your code.

    (Aside: to use code tags you start with [code] and then you paste your code and then you end with [/code] (note the way the slash goes).)
    I need help dude, im stuck, i havenīt learned 4 a while cuz im freakin stuck, can u please be more specific?

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by Kuro Tensai View Post
    I need help dude, im stuck, i havenīt learned 4 a while cuz im freakin stuck, can u please be more specific?
    There is no such thing as "os". I don't know how much more specific I can be.

  7. #7
    Registered User
    Join Date
    Jun 2011
    Posts
    2,272
    What does your book say about "en os is"? Can you post some text, and perhaps an example, from where you're seeing this?

    Also, it might be a good idea to tone down your enthusiastic salutations. A simple "Hello" would be a lot more appropriate.
    Salem likes this.

  8. #8
    Registered User
    Join Date
    Dec 2011
    Location
    Eindhoven, Noord-Brabant, Netherlands
    Posts
    54
    Quote Originally Posted by Matticus View Post
    What does your book say about "en os is"? Can you post some text, and perhaps an example, from where you're seeing this?

    Also, it might be a good idea to tone down your enthusiastic salutations. A simple "Hello" would be a lot more appropriate.
    ok, i think i get it now, but i still do not understand what his means:
    Code:
    string s(z,n)

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,598
    Quote Originally Posted by Kuro Tensai
    i still do not understand what his means:
    Code:
    string s(z,n)
    That looks like the definition of a variable named s of type string. The z and n are arguments that are passed to the constructor. Read up more on the available constructors for std::string, e.g., at cppreference.com.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

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