General C++ Programming - February 2013 (Page 7)

Converting decimal to binary using recursion
 
Hey all, I'm trying to write a program that converts a decimal number to a binary one. I have most o...
[4 replies] Last: Ah calculating the remainder before dividing fixed it, thanks for the ... (by stack99)
c++ loop
 
Write a program that calculates the average of a stream of positive numbers. The user can enter as m...
[1 reply] : The simplest way to do it is to have three variables: justEntered, sum... (by Guy Shapter)
by LB
Template fallthrough
 
I read somewhere that template instantiation failure is not a compiler error and the compiler will k...
[1 reply] : Are you talking about the SFINAE? http://en.wikipedia.org/wiki/Substi... (by EssGeEich)
by qingze
How to read data from a txt file into an array HELP!
 
I wanna read a txt file like this 1.00518 2.01903 3.01139 4.01343 5.02751 5.99913 7.00011 7.99851 ...
[1 reply] : First off, you are always inputting the data into the first element in... (by Guy Shapter)
Project for class: inserting file of names and sorting alphabetically...HELP!
 
this is my assignment: A teacher has asked all her students to line up single file according to t...
[1 reply] : Strings can be sorted using the > and < symbols. This will allow you t... (by Guy Shapter)
by qingze
Help needed Reading data from txt file
 
I wanna read data from txt file with space divided each value like 1.00518 2.01903 3.01139 4.01343...
[3 replies] Last: Thank you so much cire. Great help! Can I add you friend (by qingze)
Boost Threading iIssue
 
When I put boost::thread Thread; in my struct I get the error error C2248: 'boost::thread::thread...
[1 reply] : You can't default construct a boost::thread because the constructor ne... (by Disch)
by cob
Program crashes... cin.get() not... cin.getting
 
It's a simple dictionary, to work with pointer arrays a little. The program is supposed to tell the ...
[4 replies] Last: ahh... so then limiting the size is a separate task altogether! I must... (by cob)
Managed memory, what do I return?
 
I'm using std::shared_ptr to manage my memory, but I'm no longer sure what to return, I don't like a...
[no replies]
Template for a Stack?
 
Ok, Im editing this post.. I got a template to work, just confused as to the isFull and isEmpty func...
[6 replies] Last: Your absolutely right.. I just realized I was using () instead of [ ] ... (by jjroyale)
Dynamically allocated array help
 
I am having some trouble on understanding how to create a dynamically allocated array and then input...
[1 reply] : char *array; array = new char ; (by Smac89)
Conversion from Pdf to text file
 
Hi, I have this project for my college work but i'm not getting any single idea and with that I'm a...
[5 replies] Last: That code was compiling but the output i got was a blank text file. Wh... (by points2008)
Random number generator problems
 
I am working on a console version of the dice game pig. So there are two players, the computer and y...
[6 replies] Last: The part of the code that alters continuePlay is only performed once... (by noobletplusplus)
Unsigned int or size_t?
 
Hi, I know that to run a for loop we can use int to control like for(int i=0; i<x; i++) . But wh...
[8 replies] Last: All objects created on the stack are destructed at the end of their sc... (by LB)
Function Overloading
 
Hello we got the following assignment:  Declare a member function speak() for each of the class...
[3 replies] Last: class Dog { public: string name; public: void speak() const { ... (by vlad from moscow)
Function pointers vs subclasses
 
Hi Guys, I am in a position to choose between function pointers and subclassed objects. To make i...
[6 replies] Last: Are there C++ libraries that aren't templated on callback type? Even A... (by Cubbi)
Threading Static Templated Member Function In Template Class
 
I'm kinda stuck on this. #include <iostream> #include <thread> template <int A> struct X { t...
[no replies]
RandomRiddle
 
I have started writing a c++ code in which I must keep the program alive until the user ends it. I m...
[1 reply] : Uhh, what next? Well you said you need vector and random, put them i... (by yelnatz)
by rajiv1
Error LNK 2019 with VS 2005
 
My humble greetings to everyone. First of all, I would like to present myself. I am a student and I ...
[no replies]
Reading text file
 
I'm trying to arrange names alphabetically from a textfile. Inside my textfile, it's like : "John", ...
[2 replies] Last: Woah, thank you so much! :))) (by polkodot)
February 2013 Pages: 1... 56789... 43
  Archived months: [jan2013] [mar2013]

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