General C++ Programming - November 2014 (Page 9)

I need help with my project
(Author: Ramin Melikov) I wrote the class file, the definitions file, and the main program file, and there is something there that is not working and I can't...
Nov 22, 2014 at 4:50pm
[1 reply] : Here is the project requirement: Design and create a class called Com... (by cageybee)
Delete Node Error
Hi there.. I'm having much trouble in my following program Delete function is not working properly my rest program is working fine (that's what I think only) ...
Nov 22, 2014 at 3:20pm
[1 reply] : Your Search() function is wrong too. You're setting flag=false if ... (by dhayden)
by dkaip
operator += problem...
Why gives me 4 and not 10? Any idea why is that? struct a { int i; a() {}; a(int ii) { i=ii; }; }; a operator +=(a i,a j) { a...
Nov 22, 2014 at 12:29pm
[8 replies] Last: Thank you very mutch. Worka fine ... (by dkaip)
how do I print a vector in increments of 7?
I am trying to print out a vector in increments of 7 following a string pattern match. I am able to print out the first set of 7, but unable to print out the f...
Nov 22, 2014 at 10:25am
[no replies]
extern and global classes?
I'm not sure where I'm going wrong here. If I have created a class (Class A) which I have declared and am using in my main() function and I want to declare a s...
Nov 22, 2014 at 9:17am
[3 replies] Last: but one of my class pointers I had not allocated space for in memory ... (by MiiNiPaa)
Question about Boost.Asio
As I was reading the documentation and I noticed that you can only send data that is continuously allocated (such as a plain C style array of characters). My q...
Nov 22, 2014 at 7:45am
[3 replies] Last: @MiiNiPaa @JLBorges Thank you so much! (by benbalach)
ask for advices on proper containers to handle my work
I want to maintain a plenty of elements in a container and maintain another table record the relationships of every two elements in the container. new elements ...
Nov 22, 2014 at 7:32am
[no replies]
Sorting Nodes in a Linked List
as the title says, I need to sort the Linked list from highest to lowest or in this case. The highest Bribe gets the higher priority on the list. I have looked ...
Nov 22, 2014 at 4:31am
[6 replies] Last: Not sure if I have the Parameters correctly, and I haven't used PrevPt... (by Shuruki)
Reading from a .txt, replacing word, then overwritng .txt
My goal is to open a .txt file and replace words in it then overwrite it. My goal is half way done. It couts it perfectly, but I am having a hard time overwriti...
Nov 22, 2014 at 3:59am
[3 replies] Last: Thank you both they worked great and I have used both of your suggesti... (by bertbear)
Help with C++ Game?
Hey, I'm making a somewhat RPG game for fun, I'm in a 10th grade CS class so don't make fun of it's horrendous code, and I am using elements that we have not le...
Nov 22, 2014 at 3:54am
[14 replies] Last: Can anyone help? (by JoshuaCrotts)
Nested Loops
Hi I'm having a little trouble with my assignment thats due tonight was hoping someone could help me out. Note that the inner loop of this program is always ...
Nov 22, 2014 at 12:49am
[no replies]
Quicksort Explanation
void quickSort(int arr , int left, int right) { int i = left, j = right; int tmp; int pivot = arr[(left + right) / 2]; /* partition *...
Nov 22, 2014 at 12:16am
[2 replies] Last: http://www.cplusplus.com/faq/sequences/sequencing/sort-algorithms/quic... (by Duthomhas)
Pointer Question
So say your constructing an array of list of structs from a text file. Each struct has a pointer to the next structure, like a linked list. I'm having a problem...
Nov 21, 2014 at 10:59pm
[2 replies] Last: Prefer to use nullptr instead of NULL . (by LB)
Bug with replacing elements in 2D Vector
Hi! I have a 2D Vector defined as vector void initGridFromInput(vector <vector <int> > & sudokuGrid){ cout << endl << "Enter one row at a time with...
Nov 21, 2014 at 10:50pm
[2 replies] Last: line is a char . The '7' is a character that looks like, well, s... (by keskiverto)
switch statement
Hi i'm more confused by how the teacher worded this assignment than the fundamentals of C++ but maybe someone could help clarify. Teachers instructions :Th...
Nov 21, 2014 at 10:34pm
[1 reply] : I think the new switch statement goes between cin >> grade; and swi... (by dhayden)
heapify algorithm using array indexes
I need to heapify an array and I'm using an example from my book which shows the heapify process from a binary tree. The difference is that a binary tree goes f...
Nov 21, 2014 at 10:26pm
[no replies]
Mean and Variance
I have to write a program in which it is to compute the mean and standard deviation from a set of 10 random scores between 1 and 20. The C++ program should gen...
Nov 21, 2014 at 7:54pm
[2 replies] Last: Start by blocking out what you need to do: generate a set of 10 rand... (by PCrumley48)
Exceptions in a function
Hi, So i have this program that is basically an ATM program that prompts the user to either: deposit money, withdraw money or quit the program. Then you just pl...
Nov 21, 2014 at 7:42pm
[3 replies] Last: catch-statements should terminate a try-block inside a function or me... (by Computergeek01)
Future of C++ Modules
Hi, I've been reading into the future of C++ modules, and I don't think they can come soon enough. However, if waiting means they can do a damn fine job implem...
Nov 21, 2014 at 7:29pm
[2 replies] Last: Modules can certainly be emulated with design patterns, but that doesn... (by wcassella)
November 2014 Pages: 1... 7891011... 32
  Archived months: [oct2014] [dec2014]

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