General C++ Programming - January 2012 (Page 12)

Problem on working on my billing project.
 
Hi, i having a problem that i do not know where i gone wrong with my project. my project is on billing(hand phone bill). MY problem is that once i compute the b...
[3 replies] Last: ty alot:) careless ^^ (by leonard92)
Reverse-A-File Utility
 
Back in this thread http://www.cplusplus.com/forum/lounge/59766/ I suggested that OP try to write a file reversing utility. And then my conscience kicked in, so...
[10 replies] Last: > So fseek() shouldn't normally be trusted when used with SEEK_END? I... (by JLBorges)
Poker Hand
 
I need to write a program that can take a poker hand and store it in a 2-dimensional 4 rows by 13 columns array where the rows represent suits and columns repre...
[5 replies] Last: Hey all, I read this post awhile back and was helping a friend design... (by bstein)
OpenAL - How to play multiple .wav files?
 
Hello everybody! I managed to play requested .wav file after some tries. However, now I would like to play several files at the same time. How can I complish...
[no replies]
constructor and copy constructorerror
 
#ifndef TRIP_H #define TRIP_H using namespace std; #include <iostream> class Trip { private: string From, To, Date; public: ...
[4 replies] Last: Sorry, I am a little confused about your answer. But i do have write m... (by tangjiep)
vc++ 2008 problem
 
hi all I'm new to vc++2008 . i have written a Huffman coding class in linux which compiles and works fine and now i want to make a gui for it in windows using ...
[no replies]
game physics
 
Hi guys, I am implementing physics into an SDL "game" and my goal is to use real world equations. So far for i have delta y (kinematic equation for y-axis...
[no replies]
Templates!!!
 
Hello Guys!!! Can anybody tell me the correct declaration of template functions and template constructors? I need syntax of these two templates.....Thanks!!!
[6 replies] Last: @Moschops In template functions we have to declare template<class T> ... (by hassaanid2011)
Max heap
 
I have to write code for a max heap, i have 10 names to b sorted by heap sort algorithm. . Such as {"suhail","jhon", "akram", . . . Etc} i dont know how to sor...
[1 reply] : A heap sort just involves adding the root node to the sorted list, del... (by closed account zwA4jE8b)
Avl Tree
 
I Am trying to Implement the avl tree in a different manner I would Like Ur Help and where Am i going wrong #include<iostream.h> #include<conio.h> #...
[3 replies] Last: You didn't describe what errors are you receiving? also your main fun... (by codekiddy)
changing data every time the program is executed
 
please help me with this... i want to create a expense manager. my program is such that i enter new entry. but along with that, i also want to show the total e...
[9 replies] Last: hey...thanks bluecoder...with a little reference and your program..i g... (by aslan93)
Difference btw C++ and C with respect to variable.
 
I want to know what is the difference btw the variables of C++ and C? and if possible give me a simple program to check.
[1 reply] : What do you mean difference btw the variables of C++ and C exactly? ... (by eypros)
Game Listing Program with vectors and iterators
 
Hello everyone, I'm currently working with exercises in C++ with vectors and iterators to go with them as well. This program I've written works well, only thing...
[5 replies] Last: cin.ignore(1); will ignore just one character. You want to ignore ev... (by JLBorges)
Getting segmentation error in my code
 
Here is the question:- Problem 2: The Leaf Eaters, (Tanmoy Chakraborty, CMI) As we all know caterpillars love to eat leaves. Usually, a caterpillar sits on lea...
[5 replies] Last: Thats all fine , but how can i remove this segmentation error from my ... (by Maggi Iggam)
Convert a char to uppercase
 
Hi, I am trying to convert first letter of a word to upper case.With the below code it is working fine.I am able to convert to uppercase after finding the fi...
[8 replies] Last: In English a period must be followed with a space or a new line. If ... (by buffbill)
Urgent!
 
So when I run this, the text background is white, how do I make it match the window color? #include <windows.h> #include <stdlib.h> #include <string.h> ...
[1 reply] : iirc it's something like SetBkMode(TRANSPARENT); EDIT: I was close... (by Disch)
My method isnt looping in my while()
 
hello, i made a botAI_it class for my AI enemy in my 2D game in c++, SDL; I have a main game loop where everything goes and they all loop as they shouold. ...
[4 replies] Last: OHHH!!!! thankyou you are a GENUIS!!! i had a set() function so it wou... (by BenShen)
Are character arrays supposed to behave differently from integer arrays?
 
Well, the code is C. I hope nobody minds that considering it's a forum for C++. In any case, it's just standard C, so I think the same should be applicable in...
[5 replies] Last: The return type of twister should be a pointer. Your code would not h... (by Zia Ur Rehman)
making an array from a vector and a string.
 
Hi, i have the following problem: i have a vector of chars and a string. i want to make 1 array of chars, which will contains first the string and then the ...
[1 reply] : You might have difficulty if your string contains any null characters,... (by Disch)
Arrays of pointers to classes and type casting
 
Hi all, I am interested in the cleanest way to declare an array of pointers to a base class and assign to it an array of pointers to a derived class. Consider ...
[6 replies] Last: Thanks to Peter87 and also Disch. This solves the problem. After b=n... (by fariborzmordad)
January 2012 Pages: 1... 1011121314... 36
  Archived months: [dec2011] [feb2012]

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