Beginners - June 2014 (Page 8)

Huffman tree builder
 
I wrote a post on a similar topic yesterday about my destructor for my Huffman tree class program. I have since isolated an issue with how my tree is being bui...
[1 reply] : At line 1, nodes is a list of Btrees. one = &nodes.front(); nodes... (by dhayden)
by Befall
Back to C++, need input on how to structure stuff
 
Hey all, After a few years of not working with it much, I'm getting back into it, mainly for a few possible job prospects. The part I'm having difficulty rem...
[2 replies] Last: Putting the definition (the code) of a method inside the class makes t... (by dhayden)
by Ganado
Create a file, read from it, then write to it
 
Hi, I'm learning some stuff about file streams. What is the best way to create a file (if it doesn't exist), then read from it, then write to it? Doing fstrea...
[4 replies] Last: For a config file, that would always clear the file before trying to r... (by Ganado)
Want to buy something else? Yes/No
 
I need a loop for this, but i don't know how to put it. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { ...
[5 replies] Last: Okay, in that case then, if you want to enter another product name we ... (by Kevin2341)
Parsing a large number into individual ints
 
I have a text file with a large number and I want to store each individual digit in a vector. for example, with file "file.txt" 123456789 I tried t...
[5 replies] Last: I would tackle this program by simply reading the input in as a string... (by Kevin2341)
Classes. Friends errors
 
For some reason I am getting the following errors when compileing, even when I have the friend declaration added: ./ST.h:21:8: error: use of undeclared iden...
[2 replies] Last: OH, waw really stupid error. Thank you. I just took a brake from c++ s... (by closed account EwCjE3v7)
Binary search tree with iterator in C++
 
Hi, could someone please provide me a code of binary search tree template with implemented iterator for tree traversal from the smallest node to the largest? So...
[no replies]
stream problem
 
In this code when the user presses 1 they are prompted to enter a name for a file, after they enter it; it is saved. The program then tells them to use option ...
[5 replies] Last: Perhaps you really wanted a loop something like this: #include <iostr... (by Chervil)
Program being stopped while reading information
 
Program being stopped while reading information Hello, I'm kind of new in C++ programming. I'm trying to create a circular linked list with information the u...
[2 replies] Last: Oh man, thank you so much for that awesome reply! You answered even th... (by Jmromeroes)
by venros
C++ GUI - QT - Expectations
 
Hi guys, Im learning QT atm, and was wondering how realistic is it that I will be using this at work? or something similar at that matter. A friend of mine t...
[3 replies] Last: Guess Imma stick it out and learn it, its really easy to use and Im qu... (by venros)
Forward Declaration vs Function Prototype
 
Hello, I am wondering what is the key difference between these two terms listed in the title.
[2 replies] Last: okay thank you (by PROGR4MM3R)
Sorting Names Alphabetically
 
I've been assigned to write the following function: void sort(vector<string>&, char); – Sorts the vector of names in either ascending(alphabetical) order,...
[2 replies] Last: Another way to do it, is use a sort algorithm that compares the two st... (by IWishIKnew)
Search in file
 
Hi, I am wondering how to search through a text file for one specific word and display what is after it. For example, search for the word Rice: and display just...
[6 replies] Last: ...And also is not compatible with yours file format. So for the sake... (by MiiNiPaa)
by Auroch
Code Explanation
 
Hello, I have the following working code. It creates a text file with words and count the number of occurencies of identical words. The function "countWords" co...
[3 replies] Last: In line 14. (by keskiverto)
File reading problem
 
I'm trying to get this program to read from a file, populate a string array and capitalize all data. I keep getting errors that say "no matching function for c...
[2 replies] Last: I'm not sure I understand. The for loop on line 33 is supposed to mov... (by jynx678)
Avoiding memory leaking when implementing a binary search tree
 
So I have a binary search tree with something like this #include <iostream> #include <string> using namespace std; struct Data { string key; i...
[3 replies] Last: Thanks, you guys are the best (by Bubiche)
PLZ HELP ME SOME WITH THIS PROJECT SOON
 
Instructions Please read the following instructions (related project code) carefully: You'll be expected to observe good programming standards. • Project c...
[1 reply] : You need to at least try something for yourself and then perhaps ask m... (by mutexe)
Passing a 2D Array by ref
 
I am trying to pass a 2d array to a function by reference and for some reason it is not giving me a correct output (step 3 in the code below). I am super new to...
[8 replies] Last: That Worked :D :D Thank you Thank you ! (by newbieme)
by h4ever
Error no appropriate default constructor available (1,2)
 
In constructor of MyGlobalClass I try to pass instance of the class MyGlobalClass MyGlobalClass::MyGlobalClass(int argc, char* argv ) { CLParser * CLPar...
[24 replies] Last: This information does not help because it cannot work. The design is ... (by keskiverto)
constant number size (double output)
 
How can I define a constant width of double numbers in an output file? I use setprecision and scientific, but when there is a negative number the minus sign nee...
[4 replies] Last: Actually I recommend you to use setw() instead of outputting several s... (by MiiNiPaa)
June 2014 Pages: 1... 678910... 48
  Archived months: [may2014] [jul2014]

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