General C++ Programming - September 2016 (Page 3)

Can someone please tell me what i am doing wrong. It will run but when it does they all say incorrect and 0%.
 
I have to write a program helps your instructor grade quizzes. The program will read a file containing a single student’s answers to a recently given quiz. It...
[1 reply] : @detroit31312 Nowhere do I see you actually opening the file. You're ... (by whitenite1)
Help please
 
I honestly don't know how to code this. If/else, Do/while, while or for loop is hard for me to understand.. :/ Here are the following requirements for Proj...
[3 replies] Last: A comment is any line in the program starting with // or, multiple lin... (by closed account 48T7M4Gy)
Simple c program help?
 
1) Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-2006. An int variable named norecall has been declared . Given another int ...
[1 reply] : What help do you need? BTW, Q1 talks about norecall, but your code sn... (by doug4)
by bozmin
private vector
 
I keep trying to pass a private vector from a class to an other, but still doesn't work even as a Friend class. How can i do
[5 replies] Last: but i am having a crazy time trying to use it on a vector of class s... (by AbstractionAnon)
by PacR
Get time in milliseconds and check how much time has passed.
 
Here is my code: #include <iostream> #include <time.h> int main() { time_t time0; // create timers. time_t time1; time(&time0); //...
[11 replies] Last: Thank you for all of your help. From what i can see it looks like chr... (by PacR)
implepmention of pointer member in class
 
hi all so iam doing a assignment involving classes and kind of got stuck at the part where i have to implement this line of code: void setEmployee(string,Pe...
[1 reply] : class Employee { private: std::string address; Pe... (by JLBorges)
Linked list and classes question
 
Hello!. I followed a guide on youtube and made a linked list, but i don't really know how to make it more "c++ish", with classes and such. http://hastebin.c...
[4 replies] Last: Thanks alot coder777! :) will try it! (by Janbananberg)
by bozmin
impossible to access the private vector.
 
I am practicing a little bit in c++; but got some issues concerning private vectors. I keep getting error message saying that "It is a private member" && no me...
[7 replies] Last: Just change a few lines of code: public: Country(string name... (by coder777)
switch statement
 
hey guys i sort of need help on how one can use the switch statement in a case like below where the code is given in else if conditional structure.. int x; ...
[3 replies] Last: thank you, boost lexical cast and krako (by valentine101)
Do/While literation statement help- c programming
 
1) Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has already been declared , use ...
[4 replies] Last: Hi @all for 1) first attempt is ok, U can add : printf("\n"); aft... (by CptJY)
Reading numbers from a file (1,2)
 
Hi. I'm completely new to programming and I have a question about a program I have to write. I need to read some numbers from a file and display the sum of ...
[23 replies] Last: Oh, right. Duh. I had initialized them in the beginning and I don't kn... (by Guy1988)
Am I missing something in my while loop?
 
I'll give the instructions first: Write a C++ program that has a while-loop to loop indefinitely until an input of a value of -999 (a sentinel value). Hence, p...
[11 replies] Last: @LullaBelle You always start a new thread IF you are referring to a d... (by whitenite1)
Index
 
am working on project that i Need to change index in string but without using replace any suggestion?
[6 replies] Last: array =new I got it Thank U (by closed account 9ECjNwbp)
Trapezoidal Rule in C
 
Looking for some help with my code. I'm new to learning c and either my arrays or my loop is not computing properly. This is a trapezoidal rule program and my c...
[6 replies] Last: There are multiple ways to calculate it. I tried a program with that e... (by jtkelty)
Finding Center point of a polygon using triangles' center
 
I created a program that finds the center point of triangles but when I use it on things other than just a triangle the outputs are wrong. class Polygon { ...
[1 reply] : Could you explain which center you are trying to compute? (There seems... (by keskiverto)
applying a rule in c++
 
The payments will start in the amount of 1 dollar. Rule A - Double the installment amount. Rule B - Triple the installment amount. You are free to apply Rule ...
[3 replies] Last: You are declaring payment inside the loop, so every time you go throug... (by doug4)
by Faz777
Searching 2D Vector
 
I stored strings, from an array of strings, in a 2D vector of string... Each string in the array represents a line of comma-separated elements (strings or integ...
[no replies]
by ajayk
Merging of sorted doubly linked list
 
why this code giving me an error! #include<iostream> #include<assert.h> using namespace std; class node { public: node* create(int n); void Insert(node** he...
[5 replies] Last: Maybe you need insert both of your nodes if both data values are equal... (by nuderobmonkey)
by Tarbal
Precision and rounding errors
 
I wrote some code that will fit data from an ascii file to a polynomial. Ultimately, I will add regression (I've begun, and it is commented out in the below cod...
[1 reply] : Using a library called Eigen seemed to do the trick. Here is the code ... (by Tarbal)
Issue with printing code. Constant prints extra times
 
I'm doing this assignment for my class. I have gotten the program to ork but I am having an issue. When the program prints itself. It prints the information th...
[1 reply] : MAX_STUDENT is the maximum capacity of the array. What you need is a... (by coder777)
September 2016 Pages: 12345... 19
  Archived months: [aug2016] [oct2016]

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