Search:

Type: Posts; User: R41D3N

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. @Ace I was talking about the vector.h header in...

    @Ace I was talking about the vector.h header in the stone-age TurboC, not std::vector ^^, plus I dont think any "graphic concept" will be applicable to OP's question (since hes on the dos/prompt) ..
  2. dont use system() . If you want to hold the...

    dont use system() . If you want to hold the display screen, better use cin.get();

    the way I suggested it, you wouldnt need an if-else block. Rather than user choosing which 2 to keep as is, let...
  3. just tell the user to enter the element he wants...

    just tell the user to enter the element he wants to switch with the average ... lets say x(0/1/2)

    then your lhs would become


    a[x] = ....


    You could work vectors the same way, if thats...
  4. I guess he means something like: #include...

    I guess he means something like:



    #include <iostream>
    #include <vector>



    And nop that wouldnt be necessary, since its just 3(size fixed) values. You might as well use an array of size 3.
  5. Seems to be true (http://ideone.com/ZuGBP) ....

    Seems to be true ....
  6. @Neo1: I think they have a vector.h in TC ......

    @Neo1: I think they have a vector.h in TC ... plus there arent any frames in the dos afaik O.o ...
  7. ROFLMFAO :devil: whats this, Blast from the Past?...

    ROFLMFAO :devil: whats this, Blast from the Past?

    ^again :D ...


    Refer for Asteroids


    TIP: Drop TC, it wont get you anywhere. If you are interested in graphics using C++, try working with...
  8. Replies
    19
    Views
    2,243

    It is as laserlight pointed out. The 2 dont...

    It is as laserlight pointed out. The 2 dont really work in the same way.

    Method 1:


    for(int iii = 0; iii < 5; ++iii)
    {
    cout<<"A";
    cout<<"B";
    cout<<"C";
  9. Replies
    6
    Views
    1,746

    @whiteflags: thought so :D ... back to some brain...

    @whiteflags: thought so :D ... back to some brain storming :o
  10. Replies
    6
    Views
    1,746

    couldnt it be done somewhat like this: ...

    couldnt it be done somewhat like this:



    copy(X1.begin(), X1.end(), inserter(X3, X3.begin()));


    copy(X2.begin(), X2.end(), inserter(X3, X3.end()));
  11. Replies
    6
    Views
    1,746

    Return Type of std::copy()

    I was just wondering why std::copy() returns an OutputIterator.


    template<class InputIterator, class OutputIterator>


    OutputIterator copy ( InputIterator first, InputIterator last,...
  12. Replies
    5
    Views
    1,240

    returnSomeString() still is temporary and hence...

    returnSomeString() still is temporary and hence even if you append it or you dont(w/o const RT), hardly makes any difference in the code. Right?
  13. Replies
    5
    Views
    1,240

    Try this: const return type...

    Try this:

    const return type
  14. Replies
    14
    Views
    1,645

    You dont like it? I loved it :D ... And even...

    You dont like it? I loved it :D ... And even where you absorb the zombies for health :devil: .. What can I say, I am ebil!
  15. Replies
    14
    Views
    1,645

    @iMalc: Off those 2 I'd prefer PvZ :D ... L4D 2...

    @iMalc: Off those 2 I'd prefer PvZ :D ... L4D 2 is a bit gory~ish for me. Though Prototype 2 aint that bad even with some gore in it :)

    So end result of the topic is "the Standard Template Library...
  16. Thread: Enum as array

    by R41D3N
    Replies
    45
    Views
    18,592

    Sorry, turns out it was the compiler in that...

    Sorry, turns out it was the compiler in that site. Tried the same code with MinGW and it returns garbage :P.

    @Dontgiveup: Your best bet then is fill() :)
  17. Thread: Enum as array

    by R41D3N
    Replies
    45
    Views
    18,592

    bool (http://ideone.com/iDu3g) int...

    bool

    int

    float

    double

    Seems like all have been initialized by default. :tongue:
  18. Thread: Enum as array

    by R41D3N
    Replies
    45
    Views
    18,592

    Just compiled it, its not undefined. All elements...

    Just compiled it, its not undefined. All elements are initialized to false by default.

    Code
  19. Thread: Enum as array

    by R41D3N
    Replies
    45
    Views
    18,592

    Cant you just use: fill(test, test+100,...

    Cant you just use:


    fill(test, test+100, false);
  20. Thread: Enum as array

    by R41D3N
    Replies
    45
    Views
    18,592

    yup it gets set to null, a simple change from...

    yup it gets set to null, a simple change from false to true shows the problem :D



    why not just create your own list then, would be so much easier than the size constraint in case of arrays ...
  21. Replies
    14
    Views
    1,645

    Oh, my bad :) ...

    Oh, my bad :) ...
  22. Thread: New operator

    by R41D3N
    Replies
    14
    Views
    1,432

    Just to clarify, he meant the Standard Template...

    Just to clarify, he meant the Standard Template Library (STL) part of C++, wherein you dont have to "new-delete" stuff and can have dynamic size even during run-time ;)
  23. Replies
    2
    Views
    1,399

    This is where it falters at: float...

    This is where it falters at:



    float remaining_balance = balance - principal_paid;


    try changing it to something like:
  24. Replies
    10
    Views
    2,595

    lol Let Us C by YK can be used as a book to refer...

    lol Let Us C by YK can be used as a book to refer to so as to know how not to code :P ...

    For C++, you dont need to start out with C. If your final aim is C++, better you start of directly with it...
  25. #include "" using namespace std; ...

    #include "<iostream>"


    using namespace std;




    int main(int argc, char* argv[])
    {
Results 1 to 25 of 32
Page 1 of 2 1 2