General C++ Programming - November 2010 (Page 20)

Using functor disables creating threads through default constrcutor.
 
While using functors to create threads, I faced this peculiar problem. The following method of invoking thread doesn't work. using namespace boost; class ...
[6 replies] Last: I guess I shouldn't be surprised. =P It just seems to be getting m... (by Disch)
FINE ROOT PROGRAM !!!!!!!!!!
 
HELLO EVERYONE! IM A NOVICE C++ USER AS I HAVE BEEN STUDYING THE SUBJECT FOR ABOUT 4 MONTHS NOW... I NEED HELP ON A PROGRAM IM WORKING ON THE INSTRUCTIONS FOLLO...
[4 replies] Last: lol ok i implemented what i could and got a world of errors! if you w... (by victoro177)
Setting return value after calling "system" function
 
Hi, Does anyone know how to set user-defined return value after "system" command is executed? std::stringstream stream; stream <<"hell...
[4 replies] Last: The man page spells it out (n4nature just didn't include all of the te... (by jsmith)
Modify Version of .sys file
 
I have a sample driver file (test.sys). I want to know the version of the .sys file. I have these questions: I have not put in the version when I wrote the d...
[1 reply] : I was able to do this, by online tool - Resource Hacker (by n4nature)
by Molson
invalid use of incomplete type ‘class
 
Hello, I've a problem with my template class: template <class KeyType, class ValueType> class Dictionary { public: virtual ~...
[8 replies] Last: You can derive two classes for two key types: template <class KeyT... (by boolivar)
Segmentation Fault on return
 
I am creating a Matrix class for a project I am working on. To do so, I am overloading all basic operators. Here is an example of my overloaded + operator: ...
[2 replies] Last: Yes, it seems your copy constructor or operator= absent or incorrect. (by vukki)
Can't bind method to tr1 function with no arguments
 
The following contains a snippet of code I representative of service provider I'm trying to implement: #include <string> #include <tr1/functional> class...
[1 reply] : remove the std::tr1::placeholders::_1 from line 28. You're telling it... (by jsmith)
make 1 digit output as 4
 
char* DateType::getYear(int y) { if(y == 1) return "2001"; } how to make it in such a way that... eg.. my input for y = 2 it will ...
[2 replies] Last: i've already found out the solution-thanks again. (by nanochan1)
Good day everyone!
 
Hi everyone I'm new here, I'm using English but not so good. Hopefully I can share my few experience with all of you. For the first post, I wanna ask about u...
[4 replies] Last: Specifying ios::out is redundant. The object is already an ofstream. ... (by kbw)
Files using c++
 
Write a program to read and write a data file. While writing data follow the following instructions: a)Add one space between two successive words. b)Capitaliz...
[4 replies] Last: You need some way of identifying a sentence. That would involve searc... (by kbw)
runtime error returning memory
 
I am getting runtime error running this prgm on my computer. When I step through it appears to occur when I return memory used by dynamic allocation at the end ...
[7 replies] Last: end is already one beyond the end of the array. (by kbw)
C++ recursion vowel counter
 
stuck. not sure how to pass the char and int. I would love to keep it global since the program functions properly, BUT my professor highly frowns on global vari...
[4 replies] Last: "Now that the coffee is wearing off and the 15 hrs of homework is kick... (by encoded)
by emko
stacks as UNDO function
 
Hi, I need to make a simple calculator that just does addition and subtraction. But the program should keep a running total of the calculations entered like ...
[2 replies] Last: The function ,"main",is wrong; (by zhiyuanhou)
Why is the value showing as 0 in my function?
 
Isn't it written correctly? #include <stdio.h> #include <stdlib.h> void Instruct( void ); void GetNumbers( int ); int FindLargest (int ); void m...
[8 replies] Last: OMG, I worked now! (by x3ldonx)
by torp09
will not output characters
 
#include <fstream> #include <iomanip> #include <string> #include <cmath> using namespace std; int read(string); void print(ofstream&, int,char); void s...
[2 replies] Last: OW! My eyes, MY EYES!!! (use blocks, then we might discuss your p... (by Albatross)
AI programming
 
I want to try out some AI programming in a game, but as I have no experience in the field need a very simple game so that I can program the engine easily and no...
[3 replies] Last: en.wikipedia.org/wiki/Fuzzy_logic (by thediamondsaint)
Question about the "//" comments' seen in C++
 
Hello there. I am currently designing code for an Xbox 360 Game. The code runs on C++, and I have a question. While I read through the templates for my game, I ...
[4 replies] Last: It is a common habit among professionals to use #if 0 ... #endif to ... (by Duthomhas)
by tantel
Programming algo
 
You are going on a long horse trip. You start on the road at mile post 0. Along the way there are n horse stations at mile posts m1 < m2 < ..< mn where each mi ...
[3 replies] Last: I spot a pattern: http://cplusplus.com/forum/general/30842/ http:/... (by Disch)
by heidiK
finding duplicates for part of a string
 
Hello everyone I am trying to find duplicates for part of a string, not the whole string. The strings are stored in a file. Each line of file contains a string...
[2 replies] Last: Alright. Thanks. I wont (by heidiK)
by tomato
operator overloading and inheritance problem
 
I have already write a fraction class,then I want to write a integer class,I hope I didn't need to write all the operator overloading function again(duplicatede...
[2 replies] Last: Maybe if you asked an actual question or told us what the problem was ... (by Disch)
November 2010 Pages: 1... 18192021
  Archived months: [oct2010] [dec2010]

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