General C++ Programming - August 2010 (Page 8)

Number of ways of dividing an 'n' member team into units
 
A team of players consists of n(=5 to 100) players. It is required to divide this team into smaller units. However, the smallest allowed unit is of 5 players. F...
[1 reply] : Maybe if you think the problem in a more general way. How many ways y... (by ne555)
by LB
Custom Float Power Function
 
Hello, I am trying to make a custom floating point power function of some sort. I need to do this because I am using a bignum library that lets me declare integ...
[12 replies] Last: Then download the appropriate version for your platform. There ar... (by LB)
by rwan
Limits of << operation
 
Hi all, Assuming unsigned ints are 32 bits in size, I think it is obvious [is it?] that this is bad: unsigned int x = (1 << 32); But is this no dif...
[4 replies] Last: Hi all, Thank you all for your replies! What I was doing was use... (by rwan)
multithreaded programming
 
specifically using pthread.h Do I need to lock the mutex each time a shared variable is used to check a condition in for example an if or while statement? F...
[1 reply] : Yes, although it's probably smarter to just copy the data elsewhere fi... (by helios)
Memory Allocation for References
 
Hi, I have a question regarding the references in C++. Is it possible for dynamically allocate memory for reference variables(&var_name) using malloc or new?A...
[5 replies] Last: Helo ksrao, refer to the the same object What this for? Such a Du... (by Sinkureness)
conversion of farenheit to celsius
 
helo can anyone help me?? please.. im a 1st year college student... i dont really get it... need a C++ program that reads a Fahrenheit degree in double, then...
[10 replies] Last: oops,, i forgot.. sorry.. No need to get mad athar .. tnx for the... (by dontgetit)
Linked List Linked List
 
Hi!!! I hope you can help me with a problem, i have a linked list and i need to insert a list of values inside every node of it, and i don't know how to do ...
[7 replies] Last: Hi, I am giving you a source code in C how to insert node in a link... (by ksrao)
by jzone3
Variable Including and int and char
 
I currently made a variable using string dim; This does not include both at once because I am trying to make it as 3-D or 2-D for a Volume calc but I can us...
[8 replies] Last: do I put string.compare(string2); after I create a string or repla... (by jzone3)
OpenGL (SDL) - Rotating camera rotates everything else instead.
 
Basically, when I hold pageup, or pagedown, I want to more or less, look up or down respectively, yet this code seems to just rotate all the cubes around some c...
[9 replies] Last: I was thinking those might be backwards too, but I don't they are. If... (by Disch)
program progress by displaying percentage
 
Hi, I'm trying to incorporate a sort of progress bar in my program. I thought this might be easily accomplished by printing on screen the percentage of the ...
[2 replies] Last: What you can do is to erase the previous string similar to this: f... (by Athar)
how do I create polymorphic code in c++? (1,2)
 
not referring to virtual functions but to how viruses/worms/bots conceal themselves by encrypting their payload with a different key each time it is spread and ...
[21 replies] Last: @helios thanks for your reply I'll read on it later. (4:50 AM here a... (by blackcoder41)
Subclassing ListView in win32 api
 
Hello friends, I wish to have alternate row color in a ListView. I know that I need a subclassing of the control, but my subclassing doesn't work. Here's the ...
[1 reply] : I don't know what's wrong with your code but I have done this in a dif... (by Null)
GLUT
 
Hello, I'm looking to learn how to make a Cross OS GLUT window so I may try an OpenGL tutorial in the GLUT window rather than a Win32 window. The reason for ...
[1 reply] : Use SDL for you're input gathering and setting up the window, then use... (by Syerjchep)
by Null
Creating a function list
 
Hello, I'm trying to create a lsit of functions. Here's what I want to do: // main.cpp #include <iostream> #include "function_list.hpp" using namespace ...
[12 replies] Last: Yeah i understand what you mean, you can normally pass ret as referenc... (by Skillless)
function analisys
 
Salutations, I'm not very good in English but I'll be there ^^' So, I have a very interesting problem that i don't even know how to start, I'll make it simple ...
[4 replies] Last: thanks ne555, I'm searching about those. http://www.solvemymath.com/o... (by Brainstorm)
assignment operator with multiple arguments?
 
I would like to assign an object of a class C, from multiple parameters in differnet variables. I could make a structure containing all those parameters and an...
[3 replies] Last: Ok thanks, I would have prefered an 'automatic' assignment from my s... (by bartoli)
string analysis
 
I am working on a project of text analysis, which includes the following scenario: Assume that I have a string composed of several sentences: First senten...
[2 replies] Last: Boost.Tokenizer can be used to tokenize a string given multiple delimi... (by moorecm)
Getting error "syntax error : missing '{' before ':' "
 
Hi, I am getting following error during compilation. Please help me for this : 1>c:\program files\microsoft visual studio 8\vc\include\cstddef(18) : error...
[3 replies] Last: Well, the compiler errors speak for themselves, you have some syntax e... (by Skillless)
by Deimos
Templates and friend declarations
 
Greetings, While designing part of my game framework I came across a problem with templates and friend declarations within them. I've sumed up the problem in...
[1 reply] : A class declares its friends, it doesn't declare what other classes it... (by helios)
Overloading ostream::sentry ?
 
Is it possible to overload ostream::sentry? I have a class derived from ostream and I'd to intercept control either before or after each output operation is ...
[no replies]
August 2010 Pages: 1... 678910... 20
  Archived months: [jul2010] [sep2010]

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