Beginners - April 2011 (Page 12)

by Billst
nudge with hangman
 
Hi I'm looking for a nudge in the right direction I'm trying out a hangman mechanism that will output string obj0 = "\n --------"; string obj1 = "\n |...
[3 replies] Last: Cheers I'm not going graphical because I'm learning C++ from scratch ... (by Billst)
Converting Int to string
 
So far i managed to get up to 99 with my code. i need to get up to 9999 and it should be able to display as a string for example you input 345 it comes out "thr...
[4 replies] Last: I am not looking for a differnet way to do this. Im trying to see how ... (by bqui5449)
by fparan
My Huffman Coding using Two Queues and a Cursor
 
Hey everybody, I just want to know what you think of a Huffman coding implemented using two queues and a cursor instead of using a binary tree or a priority. ...
[no replies]
Help with looping
 
I am having a difficult time creating loops in my programs. Attached is my program: //variables and functions using namespace std; void description...
[3 replies] Last: You mean you want to put the whole program in a loop? (I don't see wha... (by hamsterman)
how to write greedy function?
 
here is what i got for my traveling salesmen problem. i seperate them in differnt parts. this part check whether the salesmen pass the route more than once ...
[1 reply] : ?? (by jimmy5023)
by Zwebra
Morse to english problems c++
 
Hello! I have abit of a problem translating morse to english. When I write my morse code like ".-" (which means A) my program writes out ab instead of jus...
[14 replies] Last: It is working now! Thanks for all your help! :D Happy Easter and... (by Zwebra)
by pooshi
Deque Question
 
I am getting an error code and I don't know why. If anyone could help I would appreciate it. #include <iostream> #include <fstream> #include <string> #...
[4 replies] Last: Thanks again fun2Code your example worked great. (by pooshi)
Multidimensional vector .clear()
 
Hello, My project requires a ton of multidimensional vectors. My original solution was to define them all at the start of the program so they'd be available ...
[3 replies] Last: The problem with vectors of vectors is the slight memory overhead (for... (by hamsterman)
arrays!
 
Hi, I got these errors ,how to solve them? error C2057: expected constant expression : error C2466: cannot allocate an array of constant size 0 : ...
[5 replies] Last: Think on it for some time. If you can't figure it out, read here: htt... (by cristi121)
simple question...
 
where can i download Turbo c ,as i have tried many sites but when downloaded it does not works ,so please tell me about a best site to download turbo c .. th...
[1 reply] : http://cc.embarcadero.com/item/25636 Is this for historical research ... (by Moschops)
Need help returning an object from an operator+ and operator* class function.
 
Here's what i have. It's only partially finished. The int Fraction::operator+ (Fraction &add) and the int Fraction::operator* (Fraction &multi) work right. ...
[2 replies] Last: Thanx i'm going to try that when i get a chance. Now that i can see th... (by jokerfwb)
Pointers and Arrays??
 
How are these three different from each other: int a ; int* a ; int (*a) ; ? My goal is to create a 3x4 2D array. I can understand the first and sec...
[1 reply] : The third declares a pointer to an array of 4 elements. Here is an ex... (by Husky)
c++ to read from an external file but 1st line and 2line do different stuffs?
 
i want to read the first line from text.txt the number gotten will define the size of the array and the 2nd integers and etc go the array (size of array given ...
[4 replies] Last: thanks hamsterman (by nanochan1)
Directory listing.
 
Hello, I've recently gotten a (Windows-only) directory reader together based on MSDN code. I'm trying to adapt it now to handle subdirectories, but it's not ...
[1 reply] : Fixed: Deleted a line too many in the reader apparently... (by Gaminic)
by Hyl
Weird characters in encrpytion function
 
I have been tasked to do a ROT13 encryption function and everything looks fine except that it outputs 52 characters even when I have specified 26 characters in ...
[4 replies] Last: Oh, thanks for clearing that up. (by Hyl)
Reading Lines form file problum
 
Hi i am trying to make a little program to execute commands My problum is when I read in a file for example like the one below at the end it adds an extra lin...
[3 replies] Last: Ok thanks I managed to fix it I just needed to add this code under fge... (by BenJones)
Where to go next?
 
I'm a beginner programmer and i'm learing C++. This morning I just finished my nice C++ Tic-Tac-Toe game. It has some cool stuff in it like the main menu, then ...
[16 replies] Last: === TEST, Debug === In function 'main': indefined reference to 'Wi... (by cristi121)
Database lab
 
Hello, I am learning C++ and pointers and arrays have been hard for me to grasp on. Last week, my teacher assigned us a lab in which we used dynamic memor...
[4 replies] Last: His use of getline was fine and the only appropriate one in this case.... (by Athar)
When to: Including Headers vs. Getting an Object Instance
 
This is a question about C++ style in general. Succinctly, the question is this: If I have two separate files, say file1 and file2, containing functions appr...
[2 replies] Last: Ah yes- that does sound exactly like what I am doing. Especially consi... (by iacondios)
by Husky
Functional programming in C++?
 
Hello, everyone. First of all, I'm new to C++. I've only ever been exposed to functional programming languages and the Object Oriented + Procedural approach is ...
[5 replies] Last: Yes, and fold() is not returning a value in the case where begin != e... (by Husky)
April 2011 Pages: 1... 1011121314... 55
  Archived months: [mar2011] [may2011]

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