Beginners - May 2012 (Page 10)

by ihato
cin with spaces?
 
#include <iostream> #include <string.h> using namespace std; int main() { cout<<"write:" string s; cin>>s; cout << s << endl; ...
[2 replies] Last: It worked! Thanks. (by ihato)
converting Int to String
 
So I've got an issue with adding an int/float into a string. I know that adding, say an int equal to 12 into the middle of a string will place a female sign ins...
[3 replies] Last: I don't want to spoil your learning fun, but then again this is a klud... (by Catfish2)
Binary Tree Desctructor
 
I'm using a structure called tree like this...\ struct tree { int grade; char name ; tree* right; tree* left; tree(tree*, tree*,...
[1 reply] : A useful definition of a binary tree is: a node pointer points to 1. n... (by kbw)
Definitions and Code
 
Hi again! Ive got a problem with a piece of code. Would anyone please check it out and see what I did wrong? The code is below: || \/ #include <iostream> #...
[4 replies] Last: A literal is a value that's not in a variable: integer literals are nu... (by Cubbi)
by Grax
need help in search item, link list
 
i need a search function that will search my each of my link list item and cout it, if item do not found, cout not found message... . . . void search(string i...
[2 replies] Last: ok i get it now! thx (by Grax)
cin fails to read - Infinite loop after reading from istandard
 
Hello folks, I'm tring to understand what is happening here. I have this simple code: ... int number; do{ try{ cout << "Enter number...
[4 replies] Last: ^^^ (by IceThatJaw)
NCurses program not working right?
 
Alright, so I'm beginning to make my roguelike, TintRL, where you kill vamps. So, in making a test for the game loop working before I start coding any features,...
[1 reply] : Hi there, You only seem to be assigning getch(); to menchar whilst yo... (by closed account o3hC5Di1)
Is this a good level up system (RPG)?
 
I was thinking about how to make a level up system for a text based rpg when I came up with this solution: #include <iostream> using namespace std; ...
[3 replies] Last: Ok, i think i get it now: void LevelUp() { static const int requi... (by drayman98)
Code won't display output.
 
So I'm working on this homework problem where I have to "roll two six-sided die" and allow the "user" to enter the number of times the dice is rolled and then d...
[5 replies] Last: Could it be, this is what you were trying to do? #include <iostream>... (by TightCoder)
typeid behaving strangely
 
I'm trying to implement a virtual friend of sorts, in order to get the class name of an object (via typeid ). However, when I set up a little test program for ...
[3 replies] Last: Oh wait, I could make a unique variable static to each class that repr... (by atropos)
BST Output the popular words
 
Currently, I wish to get the top popular 12 words in the hash table using BST. I can't seem to figure what went wrong with my code. Output should be like th...
[2 replies] Last: Well, I have you finish this in 3 hours time. Is there any kind soul ... (by Cresenia)
How do I make a set of classes.
 
I developing a text-game, and one of the problems I foresee is how do I make a set of a user-defined classes. The classes are inherited from the class 'Item'...
[3 replies] Last: TS, before you delve into Object Oriented Programming you need to unde... (by IceThatJaw)
Flowchart to Pseudocode Convert
 
Hi , Help me to convert flowchart to pseudocode . Thanks Flowchart in PDF : http://www.4shared.com/office/FgnhUY...Flowchart.html
[2 replies] Last: Converting a flowchart to pseudocode has little to do with C++ to quit... (by IceThatJaw)
Questions about void data type
 
If the data type of a function is "void", does it mean there is no need to "return" at the end of the function???
[4 replies] Last: Thanks (by qawsed51)
New here
 
Needed to find a forum where everyone knows a lot and can help. I have recently gone into C++ in a major way (have worked with a little programming in the past)...
[8 replies] Last: Needed to find a forum where everyone knows a lot and can help. Good... (by codeFoil)
template<class T> error: expected initialiser before 'template'
 
Hi cplusplus.com forum people, I've typed up this code direct from the text book, Absolute C++ Fourth Edition Savitch ISBN-13: 978-0-13-136584-1. A Generic So...
[2 replies] Last: Thanks...your tip reassured me to follow through with an unclear note ... (by eiger3970)
what book to read for a beginner
 
Hey guys, Im pretty new to C++ (actually brand new) i have read the beginning chapters in a few books to get started but right now i can't decide which boo...
[4 replies] Last: thanks man i appreciate the looking into it. the reviews i read are w... (by russd772)
Vector as member in a class used for a function
 
Hi i am having trouble with my program. i have a class called customer class Customer { private: string username; string password; ...
[4 replies] Last: Since storeAccount is not a member function in the above code, the sim... (by doug4)
by atjm88
ios question
 
Hi, can I know how to use this actually? And what are them? Thanks :) ios::binary ios::ate
[4 replies] Last: ios::binary opens the file in binary mode. In binary mode, special c... (by closed account zb0S216C)
by Smarty
ShellExecute at the start of my program
 
Ok, I put ShellExecute in my code here: ShowWindow (hwnd, nFunsterStil); while (GetMessage (&messages, NULL, 0, 0)) { ShellExecute(NULL, "Ope...
[3 replies] Last: Supposedly in your main() function. Make sure you don't put it into a... (by closed account o3hC5Di1)
May 2012 Pages: 1... 89101112... 59
  Archived months: [apr2012] [jun2012]

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