Thread: Though implementation problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    [
    Quote Originally Posted by manav View Post
    I understand the '+', but what is '-' for?
    Iterators.
    Iter1 + Iter2
    OR
    Iter1 - Iter2
    I really need to implement a range iterator here or some such. A lot of thinking left there.

    Quote Originally Posted by manav View Post
    Would you enable this in your string class?
    Code:
    CStringEx str;
    int age = 23;
    float cm = 167.1f;
    str << "She is " << age << " years old, " << cm << " centimeter high!" << endl;
    No, but this would work:
    Code:
    CStringEx str;
    int age = 23;
    float cm = 167.1f;
    str = "She is "+ age + " years old, " + cm + " centimeter high!";
    cout << str << endl;
    Or rather, float and doubles don't work. At least not yet, but maybe in the future. But integers works.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Quote Originally Posted by Elysia View Post
    Iterators.
    Iter1 + Iter2
    OR
    Iter1 - Iter2
    I really need to implement a range iterator here or some such. A lot of thinking left there.
    Ok got it

    No, but this would work:
    Code:
    CStringEx str;
    int age = 23;
    float cm = 167.1f;
    str = "She is "+ age + " years old, " + cm + " centimeter high!";
    cout << str << endl;
    Or rather, float and doubles don't work. At least not yet, but maybe in the future. But integers works.
    That's even better! I already feel like being in heaven!
    Release your implementation pretty soon!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  2. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM
  3. implementation file
    By bejiz in forum C++ Programming
    Replies: 5
    Last Post: 11-28-2005, 01:59 AM
  4. Replies: 5
    Last Post: 11-07-2005, 11:34 PM
  5. Memory Problem - I think...
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 10-24-2001, 12:14 PM