General C++ Programming - August 2011 (Page 16)

here's a good one
 
Visual studio 9 c++ - double rounding conundrum: Going back through my c++ text, simple coding exercise (algebra): given a surface area, generate a box of maxi...
[2 replies] Last: lols, I'll give it a read, thanks! (by Bin1000101)
Fresh unique idea?
 
Anyone got any cool ideas for projects? I have a high skill level and am willing to work on any topic. I prefer to work on something not so much technical but...
[1 reply] : http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-id... (by TheMassiveChipmunk)
Help With string and pointers
 
Hey I was wondering if I could get some help. I just started to learn about pointers. And I seem to get it, i just cant seem to get why this code wont work. It ...
[3 replies] Last: Thanks for the help it make sense now (by BruteCOder)
LISTBOX
 
Hello. Im programming DEV C++ WIN32 and I have a button called PLAY to play a music File. How do I get the Index of the list box and the selection. I already ha...
[no replies]
by Ryeman
Trouble with overloading the '==' operator
 
Here's the problem I'm having - I need to overload a class operator '==' so that I can compare multiple class variables in one evaluation. In my case, I need t...
[8 replies] Last: This if(1 == 2 == 3 == 4) resolves to if(((1 == 2) == 3) == 4) // i... (by coder777)
combining 3 functors into 1
 
hi, I have 3 functors and was wondering if these can be combined into 1, perhaps as a template. is it possible? if so, how would I do it. thx! struct less_tha...
[12 replies] Last: thanks Duoas, both of them worked :-) (by itcplpl)
by BHX
Pyramid of Asterisk
 
I know this topic exists but I'm not asking how to do it. I was reading and doing the examples from a book I'm reading. The code for it is pretty straight forwa...
[3 replies] Last: It could just be something the printer did... The people who printed... (by Duthomhas)
by heenan
Questions about classes
 
What circumstances would a class be required in a program? also why do we use classes instead of structures? are they interchanable and are they more useful th...
[3 replies] Last: @Syuf - Oops! I remembered to look right and to look left, but not up ... (by andywestken)
each character in a string is a letter
 
Hi guys! How do I check if each character in a string is a letter ? I can use ASCII code but I don't know...Is there another way to do this? I want to wr...
[11 replies] Last: @PlusPower It would help if your code was better formatted. If part o... (by andywestken)
Random Number Help
 
So I'm making a game, and in it you're supposed to die at a certain age. I wanted the age to be random, for more spunk. I wanted to age to be in between 60-80. ...
[6 replies] Last: Duh! Nice one, Bin1000101! (by kooth)
Functions
 
This question might sound like that from a newbie, but I really what to get it right without missing things up. The return statement is use to exit a functio...
[12 replies] Last: You guys have been wonderful. Yeah to save time and for compatibility,... (by crosslink)
double to int - will I ever have this problem?
 
Example: double d = 3.0000; int i = d; Could i ever equal 2? Does the computer store d like 3.000.....321 and 2.999....99732? Or only ever the first? I do...
[8 replies] Last: lols, reminds me of the "whole" part and the "mantissa" from assembly ... (by Bin1000101)
Need help with a game algorithm (Go/Wei-Chi)
 
I've decided to write a "Go" aka "Wei Chi" game in C++ because I'm masochistic I like a challenge and needed an excuse to brush up on my C++ skills. I'm ha...
[1 reply] : zork like? (by Bin1000101)
Code Help
 
I am very new to C++ programming and any other programming. I have written below code to return the value with sign based on indicator value, If indiccator is Y...
[4 replies] Last: Thanks Syuf. Can we use thsi same code for Float return type and Am... (by prasadv)
by aquaz
Typecast of unknown type
 
Hi, I have two classes, an pure abstract class CPPVar and another class CPPVarT defined like this: template <typename T> class CPPVarT : public CPPVar { ...
[no replies]
new Class as a function parameter
 
Hello experts, I'd like to know how does the destructor behaves when a "new Class" is being passed to a function? I have a code similar to this: class Truck...
[2 replies] Last: I appreciate your answer, helped me not to lose some marks. ;) (by FarshidT)
Numeric Input Only
 
So, I'm new to C/C++ (a few days, actually) and I'm working on a program that is supposed to calculate the box quality of a subwoofer enclosure (not important) ...
[1 reply] : The text box control should have a "mask" property that allows you to ... (by Duthomhas)
Writing a "Cross Loop"
 
I've recently just came across a program called CrossLoop, http://www.crossloop.com/ I was looking at it and was wondering how to possibly WRITE a program th...
[no replies]
Number generation
 
Hi All, I need c++ code to get the numbers. Could somebody please help me on this #include <iostream> using namespace std; int Rownumgen(int input,...
[no replies]
by reborn
Searching for amount of unique values in vector
 
I have a std::vector<Record> RecordSet; where Recrod is a struct I made: struct Record { int value; bool switch; float accurate; std::string resource...
[9 replies] Last: Excellent, thank you! It wiorks. The error was on "r1.Resource.c_str(... (by reborn)
August 2011 Pages: 1... 1415161718... 29
  Archived months: [jul2011] [sep2011]

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