General C++ Programming - May 2017 (Page 11)

HELP
 
Hi everyone. I have an c++ exam tomorrow and we have to create a program that uses struct,classes,arrays, if streams, sorting searching. if anyone has a sample ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/ (by chicofeo)
by Kalcor
Concept behind this "maths"
 
Here is the 'supposedly' maths problem that I tried to solve[its still a programming problem too]. I managed to reach the solution after a billion tries with eq...
[2 replies] Last: I got it , it's fine now, I was too lazy to completely trace the metho... (by Kalcor)
Soundex
 
I'm trying my best to get an updated soundex algorithm that works well in c++, it needs to obviously allow for the input of a string upto 20 chars and basically...
[4 replies] Last: Here's a version that doesn't overuse the erase() function. #include ... (by lastchance)
by Kalcor
Weird logic error?
 
Now consider these 2 codes: for the input: 7 1 3 1 3 2 1 2 int a ; int n; int main() { cin >> n; for(int i = 1; i <= n; i++) { int num;...
[3 replies] Last: [Program 2] outputs undefined garbage. So does program 1. It just h... (by dhayden)
char transfer to string
 
Suppose we have a : 1) char out; which is in a "for" loop and each time iteration goes on "char out" receives a new value as a letter. So, "char out" can be...
[4 replies] Last: Read up on strings. They have many more functions. http://www.cpluspl... (by Moschops)
by Kalcor
Square with missing coordinates
 
Hello, I was trying to solve a problem but I just can't seem to get the idea of how it should be solved, like I know to get the coordinates of a square you need...
[8 replies] Last: Yea it's outputting x4 y4 x3 y3 because it considers the square points... (by Kalcor)
This is an urgent! help needed...
 
1. Create a program that will ask for 5 values for an array of integer then compute and display the sum and average of the elements. The program will use getSum...
[4 replies] Last: Yay!!! Thank you Bliink i really appreciate the help!! May you have m... (by Kalcor)
C++ text formater
 
Years ago, when working with Pascal, I had a 'text formatter' that would arrange my Pascal text file into clean, uniform, styled text layout. Is there someth...
[3 replies] Last: visual studio has built in formatter. Notepad ++ has one I think. It... (by jonnin)
C++ to TASM
 
So hello guys, I need to convert my c++ code into TASM :/ just because for school, So yeah, is there any program that can compile c++ code into TASM? I don't ha...
[3 replies] Last: tell your compiler to generate the assembly language listing, and it w... (by jonnin)
by Eranka
uninitialized local variable 'm' used
 
Hi when i run the below code i get the error uninitialized local variable 'm' used. int m; const int MAXNUM = m; (error in this line) cout << "Enter The...
[9 replies] Last: Something along these lines: #include <iostream> #include <string> ... (by JLBorges)
Pointer notations to access array
 
Hi This is the code I wrote. Im supposed to use pointer notations to access the array but I did without it. How can I use pnotations to access it instead of doi...
[3 replies] Last: What he said. I must confess I haven't used an array for years and as ... (by Moschops)
Payroll Program using functions...no output
 
Hello, I'm writing a payroll program using functions. I'm using an input file named "employee.txt" to input data into the program. The program function corre...
[4 replies] Last: Can you elaborate on the issues you think I'm missing? And what does ... (by closed account 48T7M4Gy)
by Svenge
Can't figure out how to create this constructor
 
So my goal is to create a class called scoreRecord that will track scores for students received in their course. I have defined the class as following: class ...
[5 replies] Last: So I am trying to do what you did inside of the constructor inside of ... (by Svenge)
I have no idea how to start this program! I appreciate any help :)
 
Jerry’s Appliance has a special promotion for its week long Anniversary Sale. After Customers have picked out the merchandise they wish to buy, they can draw ...
[17 replies] Last: No. (by JLBorges)
cout/cin
 
I am trying to use cout and cin to output a message for the user to enter the number 1 or 2 but cout and cin come up as errors. I have the statement #include <...
[3 replies] Last: Thanks to you both, it works now. I can't believe I forgot using names... (by PhilippeJ)
by MIIB1
reverse name ??
 
hello i write a program to take two user inputs. First input is your first name, and the second input is your family name. and check if both the inputs are sam...
[9 replies] Last: thank you gunnerfunner (by MIIB1)
URGENT HELP (FIRST-YEAR c++ PROGRAMMING)
 
Hi, I am a first year in Programming please don't speak deep language. Make me understand please. Okay, please code and paste my code and fix it then paste i...
[1 reply] : Please don't double post. http://www.cplusplus.com/forum/beginner/2150... (by newbieg)
Keyboard Input
 
Hi How to check whether the user did input a value to the program? How do you check to see if the user did input anything at a cin command, if the use did not...
[1 reply] : One option: string input; cin >> input; if (!cin) // if (input... (by Thomas1965)
Arrays
 
Hi If i have a number sequence for Example 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 and maximum columns in the array is 5. if i input the above then the p...
[15 replies] Last: @seanderik I think the idea of us providing code samples is that you ... (by lastchance)
Segmentation Fault
 
I am running into a segmentation fault when the program is ran. Does anyone know why this is happening? Thank you in advanced. #include<stdio.h> #include...
[4 replies] Last: also if you want to use C headers in C++ #include <cstdio> //add a ... (by Flaze07)
May 2017 Pages: 1... 91011121314
  Archived months: [apr2017] [jun2017]

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