Beginners - June 2015 (Page 24)

by Crogn
vector issues
 
Hey guys, I'm new at c++ and trying to learn it on my own...the code below is being annoying for some reason the last bit where it says cout << "Would ...
[2 replies] Last: Thank you, how would the for loop know to print say the first object i... (by Crogn)
help with structures
 
Hello, my issue is when i go to input the data such as, address and phone number, when i use a space in between the house number and street name it skips to t...
[2 replies] Last: sir/mam, thank you for your reply. You are correct. When i tried using... (by MaseratiDeluxe)
by ruwan2
Could you explain this copy member function to me?
 
Hi, I am still new to C++. When I read a post on-line, I do not understand one line: Fred(const Fred& f) : p_(new Wilma(*f.p_)) { } ...
[1 reply] : new Wilma(*f.p_) This line creates a new Wilma instance. It calls t... (by liuyang)
by nruiz8
I keep getting an error message AFTER running my program
 
So the purpose of my program is for it to load two arrays called Names and Days and to then display 10 random questions of the days of the month and check if th...
[4 replies] Last: ok i took that out, thanks, but now i get this error: 'time' was no... (by nruiz8)
Hi everyone, if I delete nodes from a linked list, why does ptr->pPrev not already point to NULL
 
Hi everyone, in a previous post I was having a strange issue where I couldn't trace the problem. I found the reason it broke, but I'm not sure why this is a pro...
[2 replies] Last: You're right Cire. I missed something in my constructor. I underestima... (by keanedawg)
Hey guys pretty much the overloaded constructor
 
Hey guys pretty much the overloaded constructor error C2661: 'Employee::Employee' : no overloaded function takes 5 arguments Hourly(string firstName, string ...
[1 reply] : class Salaried :public Employee { protected: int managementLe... (by alicialng)
Keep getting error 86:23: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and 'void')
 
The goal of this program is to convert from number to English text. I am a beginner C++ programmer so please don't give complex explanations. Maybe someone can ...
[3 replies] Last: Well here's some hints: Are you aware of the modulus ( % ) operator an... (by Ganado)
Why has my code broken when ran in Unix/Linux but worked perfectly in Visual Studio?
 
Hi Everyone My code is getting a segfault when I run it in Unix but not in Visual Studio, is there a consistent reason for why this is? I'll share my code but t...
[1 reply] : Have you tried breaking when you get the exception or even setting a b... (by firedraco)
getting information out of a for loop
 
I'm writing a code for a biological simulation. how its working is pretty self explanatory and there are no issues there. However what I need to do is move/save...
[1 reply] : Please explain line 45 and its effect on line 46. (by keskiverto)
pretty much the overloaded constructor
 
Hey guys pretty much the overloaded constructor error C2661: 'Employee::Employee' : no overloaded function takes 5 arguments Hourly(string firstName, string la...
[4 replies] Last: There should be a big button that says edit on it at the bottom right ... (by shadowmouse)
Dealing with a large number of files
 
So, I have to deal with around 200 files analyzing them and reformatting to a useable data output. My problem is, I don't know how to open this many in a for lo...
[4 replies] Last: so final result... in order for the files to open and close correctly... (by Feymanismyhero)
by Aki12
Suggestions on how to fix my code? Please I'm already stressed enough
 
I have to read an input file calls_history.txt that is like this Mo 13:30 16 Mo 8:15 35 Tu 7:50 20 We 17:45 30 Th 8:00 45 Su 23:50 30 A...
[10 replies] Last: Thank you everyone for helping me out. (by Aki12)
Reading USB problems
 
So I have been looking all over and this is what I have found I am trying to take the measurement from a scale and output what is given and yes sadly the never ...
[3 replies] Last: Ok I found My problem I had the wrong Baud Rate thanks any way :) (by cutiepi314)
by wolfv
How to make a circular dependency work?
 
Is there a way to make this circular dependency work? class A; //forward declare class B { private: A& refA; public: B(A& refA) : refA(refA) {} ...
[4 replies] Last: > This solution compiles that "solution" has different behaviour. A(B... (by ne555)
by bext
Making my own pow
 
Hi,i wanna make(or see) a "homemade" pow code. int potency(int base , int exponent) that shall calculate potencys. So like: potency(2, 3) shall give the resu...
[5 replies] Last: (OP's problem is a common introductory course homework.) (by Duthomhas)
Role of the destructors while using smart pointers as member variable
 
Hello forum, I assume the fact the we do not have release any resource anymore explicitly as long we adopt the standard C++11. Lets check the following snipp...
[5 replies] Last: The constructor is explicit. This would compile: mAPekare = std::sha... (by JLBorges)
by omurad
Correct use of string::copy?
 
I'm getting a weird error when I run this. "testCopy" should equal "test" which equals to "hello". What's wrong with my copy function? #include <iostream>...
[2 replies] Last: 1) The stream::copy return a size_t value; 2) You just copy the string... (by stormSpirit)
Deleting a Linked List
 
Hello and I hope all is well. I am trying to remove the third node from the linked list and then linking the second and fourth nodes together. However, I'm not ...
[4 replies] Last: @coder777 I see. Thank you so much for the help! Clarified a ton for ... (by jhykima)
by Ahsen
Please helperror: no matching function for call to 'getline(std::istream&, int&, char)'|
 
Write your question here. I am trying to learn c++ from a book and I had to do a few exercises and this was the question. 1. Ask the user for two users' a...
[2 replies] Last: line 25 and line 29, you're comparing names not ages. Also, you're ... (by AbstractionAnon)
Not all control paths return a value?
 
I'm trying to create a code for password verification for a class. I thought I had it working but for some reason every time I input a seemingly correct passwor...
[3 replies] Last: Lets start with: bool upTest(char custPass ) { for (int i = 0; i < ... (by keskiverto)
June 2015 Pages: 1... 2223242526... 32
  Archived months: [may2015] [jul2015]

This is an archived page. To post a new message, go to the current page.