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

by kishad
dynamic arrays- error pointer being freed was not allocated
 
Hello. I have a class called Book and I am trying to create a dynamic pointer based array of the class. When I try to run the program I keep getting the error...
[7 replies] Last: Ah, I see. Thank you. (by i8pp)
by i8pp
Binary Search Tree-used with user defined class
 
I am working on a program that uses a class I created called Student. I want to be able to add different students to a Binary Search Tree, and use the student's...
[3 replies] Last: Okay, well I took a break and it seems the problem lies within my over... (by i8pp)
Witts end with this program...
 
So I have to make a credit card verifier and my god I have never been so frustrated in all my life. The entire source follows, I get 3 runtime errors - http:...
[7 replies] Last: Alright so I've rewritten the entire thing, making sure to check if it... (by Culbrelai)
by Nanyo
console exit
 
Hello, everyone, I’m making a program in which, at the end, the user is asked to press ‘e’ to exit. My question is: Is there a function or just anything...
[3 replies] Last: There are three possible things that I think you may be asking for (re... (by Duthomhas)
by anup30
Password Attacker problem
 
Problem: Passwords are widely used in our lives: for ATMs, online forum logins, mobile device unlock and door access. Everyone cares about password security...
[19 replies] Last: solved at last! the hardest problem in my few months programming exper... (by anup30)
by davtk8
Counting number of vowels in a sentence
 
I want to count all the vowels in a string (a, e, i , o, u) and display it as a text-based histogram for example: The black cat sat up on the orange mat! ...
[1 reply] : duplicate post http://www.cplusplus.com/forum/beginner/149241/ (by wildblue)
Non-Dynamic Local address
 
Can I return a non-dynamic local address of a var from a function? int* func(int m){ m=1; return m; } my compiler giving warning but compi...
[4 replies] Last: thanks..bottom line is, return any var which lives after func exit... (by csstudent123)
bin vs dat
 
I cannot write as binary using .dat format in ubuntu, why?
[5 replies] Last: I first created txt file then renamed it to dat, then wrote to it, but... (by csstudent123)
static huffman
 
i 'm using Static Huffman to compress i know how to compress a file, how about folder???
[3 replies] Last: what should i do if i use command line to open folder?? what next to e... (by nightmaregiba)
whats wrong with this code :( can anyone figure it out?plz help me out
 
//Write a program that declares a structure to store Book ID, price and pages of a book. it defines two structure variable and inputs values. //it displays th...
[3 replies] Last: thank you so much #konstantin2, i got it GOD bless you (by Hidden Girl)
by jodytj
Functions not working?
 
/*My instructor says: My driver does not test all the class functions. My program test data should not be hard-coded in my program. My test data should be inp...
[1 reply] : Please try to remove the double spacing from your future code posts. ... (by dhayden)
by nears
Pre-Compile check if field does allready exists
 
Hello, im new here and i am searching for a solution for the following problem: I have a dynamic storage class based on a vector. The elements of this c...
[4 replies] Last: Thanks for all your replys. I allready tried out your solutions but th... (by nears)
How would you find the nth word in C++?
 
Would you use regex? (not sure how though) Or, would you go through the hard way, and iterate through every word, until you discarded (n-1) words and reached...
[1 reply] : Oh I just found LB 's great post on istreamstring. Thanks LB !... (by jared181)
Delete BST up, left, right code
 
Is my setting of up/parent node correct? void bst::addNode(bst::hwareItem*& root, hware item){ if (root == NULL) { root=new hwareItem; ...
[4 replies] Last: I think its clear now....Pointing to root at every new null node creat... (by csstudent123)
Changing a recursive function into an iterator function
 
I had the following question in my exam and received 3 out of a possible 4 marks Here is the question: Assume the following recursive function: int f(i...
[9 replies] Last: function int f(int n) is a single function (by Konstantin2)
Implementing a recursive function to print a linked list in reverse order
 
Implement a recursive function named void printBack(DoublyLinkedNode<T>* node) for the class DoublyLinkedCircularList which will print out the elements in the l...
[3 replies] Last: template<class T> void DoublyLinkedCircularList<T> :: printBack(Doubl... (by MiiNiPaa)
How to write OO? (1,2)
 
Hi, I'm a C programmer. I've taken a C++ course and learned the syntax of C++ Classes, inheritance, polymorphism, etc. I need to write a tool which parses te...
[22 replies] Last: [quote=LB] Would you also use a chain saw to cut your papers just beca... (by Little Bobby Tables)
How to add to tail of a DoublyLinkedCircularList
 
I had the following question in my exam and got 2 out of a possible 6 marks Here is the question: Implement a function for the DoublyLinkedCircularList cl...
[no replies]
Push_back location of string in a vector to a 2d vector?
 
deleted
[2 replies] Last: http://www.cplusplus.com/forum/beginner/149193/ (by LB)
Program 6
 
Write a function, getHighestSpeed(), to find and return the array index for a ship with the highest cruising speed. 6. Write a function, showShipSpeed(), that ...
[1 reply] : int getHighestSpeed( /*params*/ ) { //code //return statemen... (by giblit)
November 2014 Pages: 1234... 32
  Archived months: [oct2014] [dec2014]

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