General C++ Programming - November 2015

if statement not working
Can anyone tell me why the second if statement in the do while loop is not working? The first one works but when i check the name vs. the name in the list again...
Nov 30, 2015 at 9:46pm
[1 reply] : Line 100: Your loop condition is i<26. Line 110: How is i ever going... (by AbstractionAnon)
program representing an axis-aligned right triangle (classes)
I am still learning the concept of classes and I'm a little confused. I keep getting the error Segmentation fault (core dumped). Can anyone please explain why? ...
Nov 30, 2015 at 9:41pm
[3 replies] Last: What about this? [code firstline=122] Point Triangle::getBottomRight()... (by AbstractionAnon)
by ncaver
Using arrays
Create a file containing 20 exams scores ( ranging from 0-100 ). Write a program to read the file, calculate and output the average exam score to the screen. Us...
Nov 30, 2015 at 8:22pm
[6 replies] Last: OMG !! thank you so much it displaced the average ! (by ncaver)
HELP WITH DOUBLY LINKED LIST
I am to write a doubly linked list of at least 5 elements and output the string data attribute for each link. Then, write an add method and a delete method and...
Nov 30, 2015 at 7:20pm
[3 replies] Last: First, please edit your post and use code tags. http://www.cplusplus.c... (by doug4)
by vjc11
Sum of 2D Array -- Help
I am having trouble writing the code to sum the elements in my array. I need to find the sum of the elements in the row of the array, minus the first column, th...
Nov 30, 2015 at 1:00pm
[1 reply] : Just wondering, what role is the file "empNames.txt" to play in this p... (by Chervil)
problem with my code
hey, i program in c++ for a month (ye im newbie :D) and in SFML lib for 1.5 weeks. i need help in my code: i made an arr to draw my game map ( i build pacman)...
Nov 30, 2015 at 10:56am
[10 replies] Last: Hi, With those code snippets cire gave, make them functions then yo... (by TheIdeasMan)
C++/CLI collection issues
I can't for the life of me find an example of a "Managed" form of collection in C++ that allows me to store a collection of created class objects. I have a s...
Nov 30, 2015 at 10:15am
[2 replies] Last: I can only create "VehicleCollection" objects in the code where the b... (by Thomas1965)
Validate if User Entered a String Value
I am building a program for customer accounts. I have a setCustomer() that allows the user to enter information for each customer. I am attempting to validate t...
Nov 30, 2015 at 8:03am
[3 replies] Last: I read the cplus.com article but we are not using the #include <stdio... (by TheIdeasMan)
not declared in this scope
For some reason I can not remedy the one error. Please advise. Thanks. #include <iostream> #include <fstream> #include <string> #include <iomanip> #inc...
Nov 30, 2015 at 6:38am
[4 replies] Last: It has to be declared as a constant because you are using it to define... (by Peter87)
by cj33
Struct Problem Final Project
I'm having trouble getting the data into the program. when i run it, it gives a value of 0 for everything. thanks in advance to anyone that can help me with th...
Nov 30, 2015 at 6:30am
[1 reply] : Don't double post, it just wastes times - http://www.cplusplus.com/for... (by TarikNeaj)
by Geeka
Error: system was not declared in this scope
#include<iostream> #include<conio.h> #include<cmath> using namespace std; int main () { char choice, choice1, choice2, choice3, choice4; int x,y...
Nov 30, 2015 at 6:22am
[5 replies] Last: Come on, code tags - we have talked about this already ...... (by TheIdeasMan)
Not sure why errors are thrown
I'm not sure why my code is getting errors, any help in figuring out why, and how to fix would be greatly appreciated. #include <iostream> #include <st...
Nov 30, 2015 at 6:09am
[2 replies] Last: Hi, Don't loop on eof , loop on getline like you do on line 56. A... (by TheIdeasMan)
Simple array program not working!!! i dont know why?!
I am trying to store values from the user into an array and then display them it seems really simple and I do not know why it is not working. I can store the va...
Nov 30, 2015 at 5:58am
[7 replies] Last: [quote=teez]@TheIdeasMan: Sorry, I have to disagree with you on the po... (by TheIdeasMan)
dynamic array
how come the random numbers could not pass onto the array? (when I ran it, the array only contains only 1 random number) #include<iostream> #include<array>...
Nov 30, 2015 at 4:55am
[3 replies] Last: thanks a lot !! TheIdeasMan here is my final code #include<iostream> ... (by lucas959)
by Geeka
Customize Your Program
o i created a scientific calculator and i want to customize it.. using code (C+) Houw can i go about doing that. NB, I know about changing the color backgroun...
Nov 30, 2015 at 4:36am
[no replies]
by Geeka
error: expected '(' before numeric constant|
#include<iostream> #include<cmath> #include<cstdlib> #include<conio.h> using namespace std; int main () { int loopcount=0; int total=0; char choi...
Nov 30, 2015 at 3:22am
[2 replies] Last: am new to this not sure how to use code tags here (by Geeka)
Cant open file
I am running this code but getting an undesirable output. The binary file cannot be opened. #include<iostream> #include<fstream> using namespace std; #inc...
Nov 30, 2015 at 3:19am
[1 reply] : http://www.cplusplus.com/articles/z13hAqkS/ Please use code tags. ... (by TheIdeasMan)
c++ code
Can anyone give me a C++ code that uses a while loop and if statements to find the middle number of the three integers by the users.
Nov 30, 2015 at 3:02am
[5 replies] Last: #include <iostream> using std::cout; using std::endl; int main() { ... (by closed account 48T7M4Gy)
by Atvus
Adding a letter in a char Array without duplications
Hello, i have to read in a word, it should come in a char Array. But if there is a letter twice, e.g. password it only should read in pasword. I tried it with ...
Nov 29, 2015 at 11:41pm
[17 replies] Last: Do you fellas suppose you could stop bumping this (now off-topic) thre... (by cire)
Derived Constructor having issues, outside of scope?
I'm making a derived class for a project, here's the code" #include <iostream> #include <stdlib.h> using namespace std; class Shopper { public: ...
Nov 29, 2015 at 9:58pm
[1 reply] : family_shopper::family_shopper( int yrs_a_mbr, double av_mnth_p... (by ne555)
November 2015 Pages: 123... 26
  Archived months: [oct2015] [dec2015]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.