General C++ Programming - October 2016 (Page 6)

by Nico
How to store unique values (pointers)
 
Hello, I am looking for a way to create a list of pointers to make a que. I am looking for something with the following properties: - if a pointer is alrea...
[4 replies] Last: You are right, I should have cleaned that up when I was done with my t... (by Nico)
by Fomer
Quadratic Equation
 
#include <iostream> #include <cmath> //sqrt #include <iomanip> using namespace std; const int STOP = 0; /******************************************...
[2 replies] Last: Do you have an issue with the code? (by chicofeo)
Finding the mode of a series of numbers - I'm trying to use std::count()
 
I'm trying to use std::count() for it, but I can't seem to get it to work. That and I don't know how to let the user stop entering numbers and then print the m...
[12 replies] Last: So something like this: #include <iostream> #include <algorithm> #i... (by Arslan7041)
by Nico
Making Remote Procedure Calls
 
Hello, Another question, I have two applications (a master and a slave) that need to work together. I have the slave sending information back to the master...
[no replies]
by Xnot
Binary read and write
 
Hello I have a problem: I have a file data.dat, which i want to read in and then print out on console. here's my code: int main() { ifstream file("data.dat"...
[2 replies] Last: Nice it really worked, thank u very much! (by Xnot)
by aight
using a classe into an other and conversely
 
Hello, Here is my issue : I create an object A, which in certain functions use an object B. So I included the header B.h in the definition of the class A....
[2 replies] Last: Thank you! (by aight)
by fryejt
Creating a file
 
Hello, I am trying to using a matrix that is generated with the code to create a file. I am really looking for guidance on this. When I run the source code i...
[7 replies] Last: Line 41 for(int n=0; n<d; n++) also causes buffer overrun at line 45... (by Chervil)
by kitcas
Need help: Adding value of an int variable between functions.
 
I have been messing with my code all day and I cannot seem to figure out why it is outputting what it is. The program is suppose to add a certain amount to an i...
[1 reply] : Please use code tags. http://www.cplusplus.com/articles/jEywvCM9/ ... (by integralfx)
Why is virtual inheritance named "virtual"?
 
Hi, I am preparing a course on C++ and have stumbled on a question I have never seen addressed anywhere: Why is virtual inheritance called "virtual"? How is ...
[no replies]
by akron1
helpppp!
 
I am need of help with this assignment. PROGRAM SPECIFICATION For the assignment, we will write a program that reads a file of information pertaining to a Farm...
[3 replies] Last: What do you have now? (by Codach)
HELP!!!!!
 
I need a code to help identify a winner for a race depending on the lowest amount of time. I also need it to identify when there will be a tie. I am completel...
[1 reply] : Lets be honest: you have homework to do. You and nobody else. Start b... (by keskiverto)
why isn't this code working? (composite numbers)
 
My assignment is to have a composite number (any number that is not prime) printing program that passes an integer through a bool method. This is the code I hav...
[2 replies] Last: (1) set status = false before the for loop, not in an else arrangement... (by lastchance)
How do you clear the screen being in a file
 
Hi all of you. I find no keyword for that. Someones use: system("cls"); But my compiler ignores that. Thanks in advance
[6 replies] Last: Cheers mbozzi - too many late nights for me; I intended to write cstdl... (by lastchance)
Setting parameters on command line?
 
Hey everyone, I'm fairly new to C++ and have been given an assignment for my class. My professor isn't that good at explaining the material so I'm a bit lost. T...
[4 replies] Last: This is what the assignment prompt looks like: Assignment: LinAppleS... (by MrinalVig)
Pythagorean Triples Program
 
So I am making a program to calculate as many Pythagorean Triples as I can. However when I debug the program, even though I have "_getch()" to pause the console...
[12 replies] Last: Dickson's method: https://en.wikipedia.org/wiki/Formulas_for_generatin... (by JLBorges)
What's wrong with my code here? (Sieve of Eratosthenes)
 
Here is my code (the explanation for what I'm trying to do is all above main() in comments, so please read that first): // chap4_ex13.cpp : Defines the entry p...
[10 replies] Last: Wouldn't that be bad (for the names and scores one)? If we delete the... (by DragonOsman)
by bp04
Error in stdint.h
 
I include stdint.h in my header file, it shows error which says " , expected ". What is the issue? Please suggest me.
[7 replies] Last: Thanks for the reply. In that case it looks like a problem with the c... (by Chervil)
Not enough arguements
 
// Description: This program calculates the average of a group of five test scores where the group is dropped. #include <iostream> using namespace std; v...
[4 replies] Last: double ix, iy, iz, iw, ib; Should be : double ix = 0, iy = 0, iz ... (by SakurasouBusters)
How do I print out the info from a class??
 
Hello everyone, I am basically creating a class called Person which holds member variables for a person's first name, last name, age, weight, and height. M...
[1 reply] : You could write an input taking function: void input_Person_data( ... (by nuderobmonkey)
cin problem
 
why the second cin didn't execute? #include<iostream> #include<algorithm> #include<string> #include<list> using namespace std; int main() { s...
[1 reply] : while (cin >> s) l.push_back(s); Should be : if (cin >> s) l.push... (by SakurasouBusters)
October 2016 Pages: 1... 45678... 23
  Archived months: [sep2016] [nov2016]

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