General C++ Programming - December 2008 (Page 8)

Switch statement not working
 
I am working on a order system which starts with an initial menu called at main but when I try to return the first function by pressing one it is not moving fro...
[2 replies] Last: yes i changed that as i thought that my min and max were causing an in... (by jpmcfly)
Startup app on external hard drive
 
I was hoping to write some applications that, when put on to a external hard drive, will automatically startup when connected to a computer. Unfortunately I hav...
[2 replies] Last: Ok thanks. I think I know how to handle it then. (by Dudester)
Getting a large number
 
Hello, I am trying to recieve a large number from the user and doing some manipulation on it. The number is 15 digit long. I tried to save as an int but it'...
[5 replies] Last: 1. unsigned long long int 2. Store it as a string 3. Store it as BCD... (by Duthomhas)
command line debug option?
 
I am making a larger project program and need to have a program wide debug option enabled on the command line. I want to have a series of #ifdef DEBUG #endi...
[1 reply] : Um, you can't. #ifdefs are compile-time directives. Parsing argv is... (by jsmith)
While loop problem
 
Hello all, I am newbie in C++ programming.Recently i encountered one problem regarding to "while" loop. The question is like that: quantity price ...
[7 replies] Last: I think a simpler way would be to use setw(), which creates a table li... (by epiqu1n)
by wlijiu
array question
 
why does this work, also I didn't reserved the memory? #include <iostream.h> using namespace std; int main() { int a ; a =1;...
[4 replies] Last: Yeah the way you usually want to declare an array is to put down how m... (by epiqu1n)
Masking Text with *'s
 
Hey I'm trying to help make a game, nothing big or important it's just for the fun of it, but what I want to do is have it so when the user inputs what they wan...
[15 replies] Last: Belkdaddy , the others here are upset at you because jsmith gave yo... (by Duthomhas)
by Gregor
libjpeg ycc_rgb_convert memory error
 
I've been trying to get libjpeg working in my project. So far I have sucsessfully compiled it and it's sample programs, however, I get problems running my own c...
[no replies]
any errors in my bubble/insertion/selection sort?
 
everything seems to work fine but I was wondering if there are any errors in my code that I have not spotted or are there any ways to optimize my code? Thank...
[4 replies] Last: Small suggestion: use the prefix increment operator any time that you ... (by seymore15074)
dynamic type -> how do I do this?
 
I am writing a program that processes data-streams. The streams differ a bit in their data-layout, e.g.: typedef struct { u_char ChannelIdHigh ...
[7 replies] Last: I don't think that will help a lot; the derived code would look like t... (by dingo35)
Linear search from command line (1,2)
 
Hi all, I am having difficulty in making a program for C++. My problem is below: I need to write a program which reads and stores in an array 10 integers ...
[20 replies] Last: Can anyone help me with the problem of 25: failed assertion `1 <= ... (by rushhour)
graphics
 
i plan to make a car racing game in c++. For this i require the display of multiple pages ( one at a time ). how can i do so??
[2 replies] Last: Dark GDK makes DirectX easier http://www.cplusplus.com/forum/articles... (by Bazzy)
Printing number in words
 
Hello, I need to write a program in C (not C++) that recives a number as input and prints out the number in words. For example: input: 120 output: one hun...
[3 replies] Last: I think std::string s are better than char arrays, so string numb... (by Bazzy)
how to send an array to another funtion
 
I have a string array in my main function, and i want to be able to use that string in a function inside of a class, how can i do this without having to copy an...
[11 replies] Last: Belkdaddy, you might want to take a look at some of the tutorials. Po... (by g0dwyn)
by vcc
Return Type
 
Here is my code: #include <iostream> using namespace std; int max(int a, int b) { if (a > b) return a; else return b; ...
[7 replies] Last: Yes, great helios, it conflict! (by vcc)
by g0dwyn
Link Error w/Static Data Member
 
Hi everyone, I have an EventManager class which makes use of static data members. I have declared them in both class and file scope, as follows: class...
[2 replies] Last: Ahh, many thanks. Wouldn't have figured that out on my own. And ye... (by g0dwyn)
Vector as a class?
 
Just wondering if I can have a vector as a class? I have an array as a class, and I have the functions within to add/change/delete an item, and even resize the ...
[5 replies] Last: In that case, you might be glad to know there already is a vector clas... (by helios)
How to char* = "string literal" appropriately.
 
One of my favorite tactics is broken :-( Please help me fix it. In some code I like to keep a lightweight trace point for debugging and monitoring purpose...
[7 replies] Last: I really didn't think that would work, but it did. The following wo... (by madscientist)
How do I print a vector in an Excel file? (1,2)
 
Hello, Im using vectors in some functions and I would like to print the content of the vectors in an Excel file. Can anybody help? I have vectors of 1200 ite...
[24 replies] Last: My point is that you recommended someting with the purpose to avoid po... (by Scipio)
Date class
 
How can i write a date class in c++. Please respond quickly if you can. Thanks
[1 reply] : Use a text editor and a C++ compiler? Your question is too vague fo... (by jsmith)
December 2008 Pages: 1... 678910
  Archived months: [nov2008] [jan2009]

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