General C++ Programming - November 2009 (Page 5)

by mnunez
arrays
 
I'm having trouble trying to figure out what the best way to declare an array that will hold up to 10 integers. with the declaration format for the array being ...
[3 replies] Last: Not quite true: int ArrayName ={0}; only initialises the first e... (by kbw)
by onur
Interface design
 
Hello, I want to create a MessageQueue class. My current interface looks like this: class MessagePipe { public: MessagePipe(); ~Messag...
[4 replies] Last: I kicked the friend part and also the separate interfaces for sender/r... (by onur)
Reversed Integer Using Arrays, My friend told me its to complicated
 
The assignment everyone has done before..lol...reversing digits. How do i make my code more simple (as my friend stated)? Trying to write a program that reve...
[7 replies] Last: Sorry about my typo Disch Yes I can see why you include the 'c' The ... (by buffbill)
by aaliya
code to get mp3 track info file properties in c++ builder??
 
hi, can you please tell me how to show the track(MP3) details in c++ builder. please if any idea please let me know.
[3 replies] Last: thx for replying.. can you please explain briefly about MM apis or COM... (by aaliya)
Rounding Decimals to Whole Numbers for Percent Output
 
Hello, I'm having a problem, I don't know how to get the output from my equation to come out as a rounded whole number. im sending whole integers into the...
[2 replies] Last: You can caste the final decimal percentage as an int which will trunca... (by buffbill)
by Creebe
Final Project for a 200 Level University Course
 
Hi I need some ideas of what kind of program I should make for my final project. Here are some requirements: 1. Must be written in C++, using Visual Studio ...
[no replies]
by JRevor
"Apparently" senseless syntax error in template class
 
This error seems to make no sense! Here's the code (not the entire code, just the relevant parts) The error is in line 17 In member function `bool Partitio...
[14 replies] Last: Holy sh-! That was the dumbest mistake EVER!. LOL Thanks a lot Disc... (by JRevor)
class error
 
Im getting and error while trying to calculate the distance between two points i have constructed using classes heres my code and error message for referenc...
[1 reply] : You declared Point copy constructor but you aren't defining it or you ... (by Bazzy)
by tatman
Apparent Segfault in std::vector Iterator
 
I've got a class with a simple function for returning an entry found in a vector. Something like this: class A { public: B* getB() { ...
[2 replies] Last: Nuh uh, the code that handles these objects looks something like this:... (by tatman)
Kind of want to write a study program for math
 
So I was thinking of writing a program that would help me memorize different formulas for math that I either need to learn, or have somehow forgotten. Since...
[2 replies] Last: You need to give some thought to the methods to be used to carry the u... (by buffbill)
Debug / Release problem.
 
Ok so I'm using SDL / openGL but I don't really think this is the issue. The game runs fine. Everything happens correctly. Running it inside visual studio on ei...
[8 replies] Last: i want to know cant you debug your application? Of course I can deb... (by Mythios)
advice on logic
 
Hello I have a project to make for a final and I am doing a program that you input certain weather conditions,cover, and water temp. Then it will output what ty...
[1 reply] : You could use a for loop to get the data with default values to cover ... (by buffbill)
Inheritance Question
 
Hi Can anyone provide an algorithm to the problem below?. I'm stumped with this question. Exercise 5: Let us consider an example of an inventory contr...
[1 reply] : Seems pretty straightforward to me. He tells you what class to make, ... (by Disch)
Debugger problem
 
Hey everyone, I am having trouble with visual studio and running without debugging. I am trying to open a file that the user specifies. They input the file...
[1 reply] : When you run the program from the debugger, the current directory is t... (by Disch)
Initializing Static Member Arrays
 
class MyClass { static int arr ; }; int MyClass::arr ={13,42,35,75,68}; I guess I can't remove the 5 from static int arr ; , but Can I remove th...
[4 replies] Last: Thanks for the answers! :) (by Tom Backton)
singleton design pattern
 
My singleton class looks like these #ifndef _SINGLETON_H #define _SINGLETON_H #include <stdio.h> #include <stdlib.h> #incldue "MyStuff.h" clas...
[2 replies] Last: Thanks PanGalactic after adding it in source file it Works fine (by rajesh msen)
by jcylam
my switch wont do its cases but it does with default??
 
switch (*pclick_function) { case 1: Left_click_once (*pGT_X, *pGT_Y); cout << "\tLeft clicked\r"; break; case 2: Double_click (*pGT_X, *...
[5 replies] Last: fixed it.....somehow without altering the code, and doing like 10 time... (by jcylam)
classes / pow function
 
Im working on a simple class program which creates coordinate points and calculates the distance between the points. i keep getting an error when i try to calcu...
[1 reply] : You have extra parentheses in the pow calls and you are using square i... (by Bazzy)
by aaliya
how to get track title information from media player in c++
 
hi, m using mediaplayer using c++ builder.but how to get track title information from media player.please if you have any idea please reply me soon.
[no replies]
how does array size affect compiling speed?
 
so my current program uses two array variables, each of size 250x250, and I use the ofstream function to output the stuff on Notepad. When I first ran it with e...
[11 replies] Last: which part should be a function? Just this part? for ( int a = 0; a <... (by larry burns)
November 2009 Pages: 1... 34567... 16
  Archived months: [oct2009] [dec2009]

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