General C++ Programming - October 2012 (Page 35)

by vijkrr
maping two values via enum
 
Hi I've two values eg enum { zero_t = 0, one_t, two_t, } from one funciton I'll get this enum value. but acutal string value of ze...
[5 replies] Last: And here it is a little more specified (less generalized) for readabil... (by Stewbond)
Template question
 
I have a simple sorting function to sort two vectors based on the value of the first vector. Here is the code. template <typename T1,typename T2> bool sort2c...
[1 reply] : It should be const references. template <typename T1,typename T2> boo... (by Peter87)
STL containers holding pointers
 
This is about the discussion started here http://www.cplusplus.com/forum/lounge/81411/ I'm making a new thread as I don't know if it's a good thing to go that m...
[no replies]
Bank Charges Program
 
// Includes #include "stdafx.h" #include <iostream> using namespace std; // Main Function int main() { float perMONTH = 10; double first , second , third ,...
[1 reply] : second = (checks * fee2) + first; What is the value of first at t... (by Moschops)
How can I debug or do a trace of program with MACRO in C
 
I have a simple program with MACRO in it as shown: #include <stdio.h> #include <stdlib.h> #define myTest(a) (a ) + (a ) int main() { int x = {23...
[16 replies] Last: I suppose you could compile the preprocessed files normally and trace ... (by cire)
Palindrome or not
 
I want to know if my code is correct . the question is ... create a program that will check if the given word is a palindrome or not. this code is running but...
[1 reply] : char word; Char is only going to hold a single character. Not sure i... (by ResidentBiscuit)
for loop
 
Program that will display sequence example: 9,8,7,6,5,5,6,7,8,9 that is the output. There's something wrong with my code: } while (fibnum > 0){ ...
[2 replies] Last: OP, your name fits you. I have no idea what you're trying to say. Are ... (by ResidentBiscuit)
Generate randomize number array
 
Create a program that will generate randomize number that will store as the element inside the array. The system will display the 1st and 2nd highest number and...
[2 replies] Last: One problem at a time. Do you know how to find the highest number in t... (by Peter87)
C ++ problem using sentinel loop
 
a mail order house sells five different products whose retail prices are: product 1 - $2.98,product 2- $4.50, product 3 - $9.98, product 4 -$4.49 and product 5 ...
[1 reply] : Multiple things 1) When posting code use the code tags ("<>" symbol o... (by codewalker)
Function
 
help please write a program which will read price of an item and tax rate.the program will call a function which will calculate the final price of the item. ...
[4 replies] Last: yeah i can do that... here it is # include <iostream> double display... (by Kenza Darling)
by aj3423
implement observer pattern
 
Hi, I'm implementing an Observable class, any class would gain the ability of the observer as long as it derives from Observable. it has two method on -> reg...
[8 replies] Last: it looks traditional, with ISubject introduced, each event needs an ex... (by aj3423)
Program that will convert temp
 
As far as i made this is what my program looks like.. but whatever value you have entered in the celsius the result of farenheit is 0 { cout << "E...
[2 replies] Last: Thank you very much :D it works. (by saywhat)
qwt3d display the number of every node in 3d surfaceplot
 
Hi! I want to make a graph with some points in the 3d space.I want to display the number of every node in a 3d surfaceplot I add the data with loadFromData(Q...
[no replies]
C++ implementation of Option Design Pattern
 
Hi everybody, I am trying to realize the Option design pattern (from http://www.codeproject.com/Articles/17607/The-Option-Pattern) in C++. I am trying it wit...
[3 replies] Last: http://en.cppreference.com/w/cpp/types/is_pod (by morando)
Collision Detection - how do they do it?
 
Ive played games like terraria, minecraft and worms world party, all great games, but how do they do their collision detection? I mean, trying to 'test' an enti...
[3 replies] Last: Thanks for the replies, much appreciated. Just a curious question :) (by SuperStinger)
by cbegan
code help
 
I need help writting code for the following: Declare k, d, and s so that they can store an integer, a real number, and a small word (under 10 characters). ...
[1 reply] : I guess http://www.cplusplus.com/doc/tutorial/ will answer these nicel... (by codewalker)
Help creating table in C++
 
Hey Guys! I was hoping somebody could help create dynamic tables.In this program a user could create a folder to store information (example: Amount of money, A...
[1 reply] : Look at std::map http://www.cplusplus.com/reference/stl/map/ Otherwis... (by codewalker)
Programming assignment help/advice?
 
Write a C++ program to process payroll. Raw payroll input data is stored in the file: payData.txt. This file contains the following fields: -Employee ID -Co...
[4 replies] Last: You need a class for the employee. It will have member variables for t... (by TheIdeasMan)
Does Uint8 or short use less memory
 
Hi all, just a curious question. If I use a short or Uint8 or Uint16 rather then just a plain int, would I use less memory, therefore be more efficient to us...
[5 replies] Last: Thanks for your replies, much appreciated! Oh and thanks for the artic... (by SuperStinger)
by iky
Write a literal representing the integer value zero.
 
i thought i knew how to do this but i tried everything and nothing seems right. can someone help me? thanks.
[2 replies] Last: "\xC0\x80" :O] (by Duthomhas)
October 2012 Pages: 1... 3334353637... 50
  Archived months: [sep2012] [nov2012]

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