Beginners - December 2010 (Page 6)

by Boda
Wierd round on a float
 
I was practicing/learning C++ while came up with a problem that requierd me to derange large nunbers to units one at a time. Like 157 get 1 then get 5 and then...
[3 replies] Last: Thanks ppl. The % and int is really well thought. But without major ... (by Boda)
read from file
 
friends ; I saved a usernames and account in txt file and I want to when file launches user enter their username and password and if their username and passwor...
[2 replies] Last: try this one: http://codewall.blogspot.com/2010/12/reading-and-writin... (by thecodewall)
"Finding a sum of two numbers"-program
 
Hello, I've been trying to write a simple program using that minimum of knowledge that I have in C. I tried to write it intuitively, and I guess got it wrong...
[5 replies] Last: yup. got it! thanks. (by closed account E85L1hU5)
Unable to Multiply Decimals?
 
Hello! This is my first thread on here but I hope to be posting a lot more because C++ has become very interesting and I have many projects in mind. Now o...
[7 replies] Last: Instead of ifstream and ofstream, just use an fstream. (by Kyon)
by Flava
Quasi-Informational system(Dynamic structures\&&some other stuff)
 
Greetengs everyone, On my courses i was given additional homework(Yea,yea i know): But still I am looking forward to see any help froum you cause some thin...
[1 reply] : The most straightforward way would be to create the two classes as you... (by Kyon)
Family age database c++
 
I'm trying to create a small program where the user can input one of the strings name and he will receive teh value. In this case you put the name of a person f...
[4 replies] Last: if ( father == name ) { also, when posting code put it in code ... (by quirkyusername)
My Fail-Shapley Algorithm
 
Sorry if I'm posting too much here but... Well, I'm kind of stubborn and I'm REALLY trying to learn this stuff FAST. (Although I do understand that learning som...
[2 replies] Last: get rid of that goto and replace it with a do while loop, gotos aren't... (by quirkyusername)
Applicable Math
 
So I've been trying to write a program that implements the Gale-Shapley Algorithm, that Stable-Matching stuff. It took me little bit of time to fully wrap my he...
[5 replies] Last: if you ever need help with calc let me know. I'll just remain idle on ... (by ERanz21)
C++ code won't compile.
 
I 'm doing a project to simulate an ATM machine like withdraw,deposit, see current balance, and make it keep asking the user what do you want to do unless they ...
[4 replies] Last: i think there will be an error with your while statement while(cho... (by ERanz21)
Generic Programming and template function definitions only in header files?
 
Hi -- I'm trying to adopt generic programming as a practice as I learn C++, but have come up against a bit of a wall. Basically, unless you define your template...
[9 replies] Last: Brilliant, thanks. Think I'm gonna be an approach no. 2 man, myself. ... (by biot023)
Address in Hex without a 0x?
 
I made a program to find the address of some simple variables, and it says that the address for them are 003AF79C for one and 003AF78C for the other. I know th...
[5 replies] Last: if you're using printf you can say: printf("%0#32x",0xff); which g... (by rocketboy9000)
by JoshMP
Problem with an Algorithm
 
I'm writing a program that analyzes winnings and losses for a combination of wagers (x2 round robin) and need to write a loop that determines the earnings if a ...
[2 replies] Last: That seems to be the problem, thanks. And I don't start that loop fro... (by JoshMP)
How to allocate a contiguous two dimension vector?
 
vector<vector<int> > twoDim(20, vector<int>(20, 0)); vector of vector is ok but the array is ragged I only know two way to do it 1 : define a data st...
[2 replies] Last: Thanks, I don't need to "push" anything during the runtime, the size w... (by stereoMatching)
Scope operator for partial template specialization
 
Hi, Got a quick question. Let's say I have the following shell of a template and a partial specialization of that template: template<typename T, int par...
[2 replies] Last: Excellent; many thanks... (by freakalien)
by Faff
Visual C++ Forms
 
Hello, Been through the basics of C++ programming (finished "C++ A Beginner's Guide 2nd Edition(2003) by Herbert Shildt) and thought I'd continue with Window...
[2 replies] Last: Thanks ! Managed to find a free readable version of the book on am... (by Faff)
by Leppie
Array sort problem
 
I've created a small array to hold integers as a small part of a program, array is a bag I can put integers into and out of (eventually). However when i compile...
[4 replies] Last: Just needed to break out of the loop, thank you both, Leppie (by Leppie)
Can we do this in c++
 
Is there a functionality in c++ to run two or more methods\modules simultaneously... I mean, Assume i want a program which keeps on printing "hello world" unti...
[13 replies] Last: Well they better get ready for it, becaust its coming with C++0x soon.... (by closed account 3pj6b7Xj)
html link in a program
 
What is the code for a button that will take you to a site? If you don't mind use cplusplus.com as the example...
[3 replies] Last: hey thanks man, but it doesn't work for 'C++ Windows Form application ... (by thenewguy)
by ToniAz
Classes and templates
 
template <class __Key, class __Value> class Node { public: typedef Node <__Key, __Value>* Ptr; Node(__Key & __k, __Value & __v) ...
[3 replies] Last: Exactly! I know I should add key and value under private so I can... (by ToniAz)
Is typecast permanent?
 
If I have this snip of code: cout << ps << “ at “ << (int *) ps << endl; Does it turn the ps pointer into a point-to-int forever or just for that part...
[2 replies] Last: A type-cast can be thought of as a translation. In this case you're tr... (by Albatross)
December 2010 Pages: 1... 45678... 35
  Archived months: [nov2010] [jan2011]

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