Search:

Type: Posts; User: immy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Smart Pointers

    by immy
    Replies
    13
    Views
    9,334

    Smart Pointers

    Hi, I have been reading and watching some tutorials on smart pointers. I understand what they are and why they are used. I don't understand why some people say there are only 2 types of smart...
  2. Replies
    11
    Views
    2,734

    Oh yes, I understand what your saying and that...

    Oh yes, I understand what your saying and that makes sense.



    //Task 2: Cinema
    #include <iostream>
    #include "Person.h"
    #include <string>
    #include <queue>
    using namespace std;
  3. Replies
    11
    Views
    2,734

    adds the users age to the queue

    adds the users age to the queue
  4. Replies
    11
    Views
    2,734

    I haven't learnt about vectors yet, thats the...

    I haven't learnt about vectors yet, thats the next chapter I need to learn.

    However I tried the code below and am getting a "no instance of overloaded function" error



    //Task 2: Cinema...
  5. Replies
    11
    Views
    2,734

    Thanks for the replies, I realise that I need a...

    Thanks for the replies, I realise that I need a local variable to access the class
  6. Replies
    11
    Views
    2,734

    Accessing my class from a queue

    Hi guys the question I am attempting is





    //Task 2: Cinema
    #include <iostream>
    #include "Person.h"
    #include <string>
  7. Thread: sort algorithm

    by immy
    Replies
    3
    Views
    1,796

    Thanks, I can't believe I over-looked that so...

    Thanks, I can't believe I over-looked that so many times!
  8. Thread: sort algorithm

    by immy
    Replies
    3
    Views
    1,796

    sort algorithm

    Hi guys, the question I am attempting is below

    A program is required to register user votes for a number of talent contest candidates. When all the votes have been cast, the program should sort...
  9. Replies
    2
    Views
    852

    Understanding this piece of code

    //Code from my SystemClass!

    bool SystemClass::Frame()
    {
    bool result;


    //check if the user pressed escape and wants to exit the application.
    if (m_Input->IsKeyDown(VK_ESCAPE))
    ...
  10. Replies
    8
    Views
    708

    I cannot believe the solution was that simple!...

    I cannot believe the solution was that simple! Thank you very much for the help
  11. Replies
    8
    Views
    708

    I now understand the problem, do you have any...

    I now understand the problem, do you have any recommendations on how to access the first and second element of an array without going out of bounds? I have tried adding conditions to no avail.
    ...
  12. Replies
    8
    Views
    708

    I am using j+=1 because j+1 crashes the program...

    I am using j+=1 because j+1 crashes the program for some reason? And too me its basically the same-thing.



    I have tried using a different name, but my problem still persists. Could there be...
  13. Replies
    8
    Views
    708

    Accessing an element in an array

    //HEADERS
    #define GHOSTCOUNT 10
    Ghost_Munchie* _ghosts[GHOSTCOUNT];

    //===================================================================



    for(int j =0; j < GHOSTCOUNT; j++)
    {
  14. Confused on structures - functions example [Noob Question]

    Hi,

    I have been reading through my c++ book and came across an example I do not fully understand, with very little explanation given. I am hoping someone from these forums can better explain what...
  15. Replies
    3
    Views
    838

    Thank you for the response, I made the necessary...

    Thank you for the response, I made the necessary adjustments and the program now runs fine. However how would you represent monetary values if not using double?
  16. Replies
    3
    Views
    838

    C++ classes problem

    Hi,

    Here is my code:

    Class Header


    #include <iostream>
    using namespace std;
    #pragma once
  17. Thread: Reading Files

    by immy
    Replies
    1
    Views
    748

    I solved the problem, it was because I didnt make...

    I solved the problem, it was because I didnt make the program read the first integer as a line. E.g.
    (openFile >> no_donors).get();
    Disregard this thread lol.
  18. Thread: Reading Files

    by immy
    Replies
    1
    Views
    748

    Reading Files

    I am stuck on the following question:

    8. Write a program that opens a text file, reads it character-by-character to the end of
    the file, and reports the number of characters in the file.

    9.Do...
  19. Replies
    3
    Views
    1,218

    Did any ladies remove their socks? Was a toe...

    Did any ladies remove their socks? Was a toe shown?
  20. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    Thank you for the helpful explanation, and thanks...

    Thank you for the helpful explanation, and thanks also to everyone who helped me with this problem.
  21. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    It works, but I don't know why it is...

    It works, but I don't know why it is working....by simply doing cin >> s;

    Why is the cin working but not the getline?

    Could you explain in a simple way?

    Why are the two reacting so...
  22. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    I havent yet covered "vectors" is there an...

    I havent yet covered "vectors" is there an alternative way of doing this with just using strings?



    I see, but how would I make it dynamic to my situation?
  23. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    cin >> s would store 1 variable (allowing one...

    cin >> s would store 1 variable (allowing one input). I want to store several variables on the same line: "apple banana orange end"
  24. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    You could of left a serious answer :confused:

    You could of left a serious answer :confused:
  25. Thread: C++ strings

    by immy
    Replies
    11
    Views
    1,220

    C++ strings

    Hello,

    My question is on c++ strings. At the moment my program is reading input in one line at a time after the user presses enter.

    I want to read multiple values in on a single line
    Example:...
Results 1 to 25 of 35
Page 1 of 2 1 2