Beginners - March 2016 (Page 8)

How can do a default constructor that will ask for a name to be entered from the keyboard and stores it?
 
How can I do a default constructor that will ask for a name to be entered from the keyboard and stores it. It also initializes a counter that keeps track of the...
[2 replies] Last: The maximum number of test scores is 5 and isstored in the class da... (by dhayden)
by Kman
Deep copy of a list?
 
I need to perform a deep copy of a list, but I'm not sure how to continue. Here's my struct declaration, which is set to private: struct BookListNode { ...
[13 replies] Last: It doesn't matter where I add it, so the end would be fine. Length is ... (by Kman)
problem with converting base code
 
hi, i have written this code for converting from base 10 to base 2 but it dose not work for numbers having more than 3 digits.(like 1231) if anyone can help me?...
[1 reply] : It sounds like your unsigned long is 32 bits, which has room for only ... (by dhayden)
Operator== overloading
 
As far as I have read. If I want to access a private member of a class, I should use friend . If I want to use find in <Algorithm>, I need to have operator== ...
[3 replies] Last: @ iHutch105 : Your op== is a member of Log. A member has no need for g... (by keskiverto)
by bPrice
What does "buffer" mean?
 
I have read Wiki, I have read a lot of other definitions. Still I feel very confused every time I come across this word. I am no computer science professiona...
[1 reply] : It is like your wallet. You can put money into wallet. The wallet cann... (by keskiverto)
Enigma: A cipher program
 
Sample Output: ***** ENIGMA ***** Encrypt Decrypt Exit Enter choice: 1 ***** ENCRYPTION ***** Enter plain text to encrypt: i love you Enter encryp...
[1 reply] : What do you need help with? (by chicofeo)
Merging two files and the output is in order.
 
I'm trying to write a program that reads two input files and the output lists all lines from both files by the same key field. Right now the output is showing o...
[no replies]
Printing the Size of Vector String Elements
 
I have created a program that takes user inputs and places the inputs of strings into a vector. My issue is I want to display the size of the strings that have ...
[2 replies] Last: Yes! It worked! Thank you so much. Oddly enough I used that same synta... (by tehHuzzlenut)
hi why cerr make my program so slow?
 
ok i pratice my programming in uva. When I submit this code (uva 10284) #include<bits/stdc++.h> using namespace std; #define sync ios_base::sync_with_stdio(0)...
[1 reply] : > cerr is very slow due to having no buffer? std::cerr does have a ... (by JLBorges)
Trying to exit my program after a "while"
 
I'm writing a sudoku game and my only problem right now is that I can't get it to terminate the program after the board is saved. Any ideas or suggestions? ...
[2 replies] Last: thanks (by aerichsen)
Inverted pyramid help
 
so im suppose to make a inverted pyramid with 3 for loops with numbers going downward but i cant solve it. My brain is not working right. I have looked online f...
[1 reply] : 9 8 7 6 5 4 3 2 1 2 3 4 5 6 7 8 9 ... (by chang123)
Losing input stream?
 
I've been at this for a while. This section reads a text file into a structure array. If the array fills, double_size is called to increase the size. All this...
[no replies]
by CSgo
Nested Loops - Help!
 
Objective: Implement nested loops in a program to assign grades to students in a class at the end of a semester. When entering the scores, if a student had a...
[no replies]
by Tonlee
An easy question
 
Hello, I am reading Thinking in C++ V2, there is something I can't figure out. The code in the book: //: C06:CopyInts3.cpp // From "Thinking in C++, V...
[1 reply] : > but the parameter here requires to be function object See how it is ... (by ne555)
Any advice on cleaning up my program
 
I have my program but it looks bulky to me. I may be wrong but here it is tell me what you think. // Identify and list the N prime numbers, starting wi...
[2 replies] Last: Hi, The main program asks for a number to calculate primes until a gi... (by TheIdeasMan)
Why does my code not handle negative numbers for reversing?
 
My program takes an integer negative or positive and outputs the reverse. If the reverse overflows or underflows it returns 0. #include <iostream> #incl...
[4 replies] Last: I changed it to something that works with negative or positive, but do... (by JoshuaStudent)
by marrom
No output window
 
Hi I tried to run the hello world .cpp file, but no window is formed. And I've tried system(pause), cin.get(); etc, and still nothing came out. I doubt it's m...
[3 replies] Last: First press F9 to compile. If that is successful, press F10 to run the... (by Chervil)
Why is my program crashing/segmentation faulting?
 
So for an assignment, we're making Huffman trees, and I'm trying to write a function that finds the two smallest frequencies in a list then removes them then ma...
[9 replies] Last: Ok Ill try that. It would appear that it crashes during that. (by vaultDweller)
Problems with vector sort
 
Im having trouble with vector sort, problems are in comments in code. Please let me know if more information is needed // function declaration bool sort_pr...
[2 replies] Last: Sorry! line 16 (for loop) was not supposed to be in there, that was fr... (by b29hockey)
by Otomai
Mad Libs Game Help
 
So I made this Mad libs game but I need to make it so that no string objects are passed to the function that tell the story. Instead the function should accept ...
[no replies]
March 2016 Pages: 1... 678910... 47
  Archived months: [feb2016] [apr2016]

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