Search:

Type: Posts; User: Iceboxes

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    580

    You can input ctrl-z. It signifies end-of-line.

    You can input ctrl-z. It signifies end-of-line.
  2. Replies
    17
    Views
    2,304

    struct cat { cat() {} explicit...

    struct cat {
    cat() {}
    explicit cat(const cat&) {}
    };


    void cheezburger(cat) { std::cout << "i iz hungry, gief chezburger plz"; }
    void cheezburger(const cat&) { std::cout << "lolololol...
  3. Replies
    17
    Views
    2,304

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Purrfect...

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Purrfect explanation
    (ΦωΦ)
  4. Replies
    17
    Views
    2,304

    intaddEm (cat myCat); int addEm (const cat&...

    intaddEm (cat myCat);
    int addEm (const cat& myCat);
    An ambigous call is what you think it is, and this happens because your two functions may take the same argument. Needless to say, it cant know...
  5. Replies
    1
    Views
    695

    Dont know if I understood you correctly, but I...

    Dont know if I understood you correctly, but I think you can use getline.

    getline (string) - C++ Reference

    With your code, it would look something like this:

    while (!p.eof())
    {
    ...
  6. Replies
    4
    Views
    1,181

    A neat way to iterate through the string is to...

    A neat way to iterate through the string is to use a range-for loop! It looks atleast a lot easier than what you described :)

    Range-Based For Loops in C++11 - Cprogramming.com

    Example with your...
  7. Replies
    2
    Views
    615

    Comparing strings problem.

    Hello!

    So I have a problem with finishing this task from C++ Primer 5th edi, Chapter 9:

    Write a function that takes three strings, s, oldVal, and newVal. Using iterators, and the insert and...
  8. Replies
    7
    Views
    1,602

    Dont think so much about the efficiency of such a...

    Dont think so much about the efficiency of such a small level program. I cant help you out if it were a high level program, but you should just focus on how to write a program doing what you want it...
  9. Replies
    2
    Views
    666

    Thank you! :) I think it was the second one the...

    Thank you! :) I think it was the second one the book was asking for
  10. Replies
    2
    Views
    666

    Initializing string from a vector

    Hello, I am learning about ways of initializing strings from other containers. One of the tasks is to initialize a string from a char vector, but something goes wrong, and the book doesnt show an...
  11. Replies
    36
    Views
    2,455

    Is that what pinkie pie would say, my friend? :C

    Is that what pinkie pie would say, my friend? :C
  12. Replies
    7
    Views
    724

    I meant as in how they work :) Or do they work...

    I meant as in how they work :) Or do they work differently? If I were to take a fstream, make it into a string and then apply that string to istringstream, I would basically have the same stream as I...
  13. Replies
    7
    Views
    724

    Aah, that was what I thought, that istringstream...

    Aah, that was what I thought, that istringstream is basically fstream, just specifically for strings. (If it's that what you meant) I just wasnt sure. Thank you very much!
  14. Replies
    7
    Views
    724

    Understanding istringstream

    Consider I have a vector of strings and then I use an istringstream to read each word of each element in the vector, why do I nescessarily use an istringstream?

    This is the code that does what I...
  15. Omg, I KNEW that, but completely forgot .......

    Omg, I KNEW that, but completely forgot .... Another derp moment on this forum... So embarrasing >,< thank you so much for pointing the error out though!! You are a nice person :-)
  16. Trouble understanding file input and output.

    I am trying to write a function that takes a string input from a file and then stores the string in a vector.

    I think the problem lies in the algorithm to take the input and store it in the...
  17. Replies
    2
    Views
    600

    Enumerated types are basically assigning a value...

    Enumerated types are basically assigning a value to a "word" and you can use that word later on as a replacement for that value which helps readability. I know what the book wants you to do, and that...
  18. Replies
    4
    Views
    2,666

    What do you think you ought to do? .. You have...

    What do you think you ought to do? .. You have the clearly stated algorithm and people are not gonna write the code for you.. Do something and ofcourse you will receive help.
  19. Replies
    8
    Views
    690

    Was writing on my phone, so some details was...

    Was writing on my phone, so some details was easily forgotten >.>

    Thanks to everyone that helped me, you guys are awesome!!!!!
  20. Replies
    8
    Views
    690

    Or a "function" outside the class

    Or a "function" outside the class
  21. Replies
    8
    Views
    690

    You made me understand constructors more, but...

    You made me understand constructors more, but moving on, I dont think I am supposed to use a copy constructor here.
  22. Replies
    8
    Views
    690

    Do I set "Contents" equal to something in the...

    Do I set "Contents" equal to something in the constructor, or am I supposed to do that when I declare it?

    Are these constructers what the book is asking for?


    screen(pos ht, pos wd) :...
  23. Replies
    8
    Views
    690

    Constructor excercise

    This excercise is from C++ primer 5th edition.

    I have not understood everything about constructors, mainly about how they function.

    Work prior to the excercise was creating a class called...
  24. Replies
    5
    Views
    933

    Thanks guys! It compiled and I think it is...

    Thanks guys! It compiled and I think it is working as it should.

    @laserlight, part of my problem (which I didnt mention) was that I didnt know exactly what to do in order to add the functions to...
  25. Replies
    5
    Views
    933

    Function pointers syntax and excercise.

    This is from C++ Primer 5th edition excercise 6.54 and 6.55.

    So the first excercise goes like this:
    Write a declaration for a function that takes two int parameters and returns an int, and...
Results 1 to 25 of 40
Page 1 of 2 1 2