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...
Type: Posts; User: immy
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...
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;
adds the users age to the queue
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...
Thanks for the replies, I realise that I need a local variable to access the class
Hi guys the question I am attempting is
//Task 2: Cinema
#include <iostream>
#include "Person.h"
#include <string>
Thanks, I can't believe I over-looked that so many times!
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...
//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))
...
I cannot believe the solution was that simple! Thank you very much for the help
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.
...
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...
//HEADERS
#define GHOSTCOUNT 10
Ghost_Munchie* _ghosts[GHOSTCOUNT];
//===================================================================
for(int j =0; j < GHOSTCOUNT; j++)
{
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...
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?
Hi,
Here is my code:
Class Header
#include <iostream>
using namespace std;
#pragma once
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.
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...
Did any ladies remove their socks? Was a toe shown?
Thank you for the helpful explanation, and thanks also to everyone who helped me with this problem.
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...
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?
cin >> s would store 1 variable (allowing one input). I want to store several variables on the same line: "apple banana orange end"
You could of left a serious answer :confused:
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:...