49,766 Topics

Member Avatar for
Member Avatar for tomtetlaw

Whenever I include this file more then once: [code=c++] #ifndef GFUNC_GAURD #define GFUNC_GAURD #ifdef _WIN32 #pragma once #endif #include "DarkGDK.h" // For getting the next unused ID int GetNextID( ) { int temp = 1; while( dbObjectExist( temp ) ) // Found an id == temp? temp++; return temp; } …

Member Avatar for Salem
0
100
Member Avatar for nrobidoux

I'm trying to figure out how to attach a class with pure virtual <</>> operators to other classes for the purpose of saving/loading the application state. So I started off with: [CODE]class IWriteable { public: IWriteable(): pCls(NULL) {} IWriteable(void *p): pCls(p) {} virtual ostream& operator << (const void * &p) …

Member Avatar for nrobidoux
0
131
Member Avatar for XodoX

Hello, I got the following code: [code] #include <iostream> #include <cstdlib> #include <ctime> using namespace std ; // Function Prototypes void pause(void); /** defines an abstract class */ class Jukebox { public: virtual void play() { cout << "Record unknown\n" ; } } ; /** defining subclasses */ class NewAge: …

Member Avatar for crazyboy
0
97
Member Avatar for azjherben

I have been using just SDL for alot, but it really olny does 2d things well. So I started learning OpenGL from the tutorials at [url]http://anomtech.uuuq.com/[/url] I was fine using Dev-C++ until the textures tutoiral, where the program would immedently crash as soon as I compiled/started it. So the maker …

Member Avatar for Ancient Dragon
0
259
Member Avatar for Leniel

well this a parallel array and also be able to process the arrays but it doesn't do so can some one give me a hint of what i might be doing wrong. Thank you before hand. ------------------------------------------------------------------------- [code=cplusplus] #include <iostream> #include <new> using namespace std; int main () { int …

Member Avatar for Leniel
0
185
Member Avatar for jake43

I am new to c++ and i advice for this particular assignment. I new to programming. The instruction is to use while loop for the two output process and for loop for the other 2 output. #include <iostream> #include <iomanip> #include <math.h> using namespace std; int main() { system("color 4"); …

Member Avatar for VernonDozier
0
111
Member Avatar for Schwein

Can Someone help me regarding my C++ Assignments? I'll list the questions below: ASSIGNMENT 1 Assume the array in the following table represents the monthly rental price of six resort cabins over a five-year period. YEAR 2005 2006 2007 2008 2009 1 200 210 225 300 235 2 250 465 …

Member Avatar for VernonDozier
0
196
Member Avatar for Smoking Bros

Hello guys! I'm new at C++ (started yesterday) but I'm a fast learner and I think I got pretty far with this noob project! The only thing I need to do is to make C++ open my .txt file and the beta version of this application is done! By the …

Member Avatar for AssaultM16
0
225
Member Avatar for Dia.A

Hi everybody, I'm trying to make a strategy game using C++ ,a simple game, my objective is to improve my way in oop analysis, currently I don't have an idea on how to do many things in this game, but I think of making it my companion in learning the …

Member Avatar for mrnutty
0
130
Member Avatar for iamsmooth

Hey guys: I'm having trouble breaking out of a loop that takes input from a file. I can only break it if I make a code that specifies how many inputs there are and makes it stop when it reaches the max input. I think it has to do with …

Member Avatar for mrnutty
0
141
Member Avatar for goody11

Hey, I was attempting to make a password protection system in windows API where someone can type the password in an editbox and if it is the right password, then continue the program else display an error message box. I've tried a bunch of different things but can't get one …

Member Avatar for goody11
0
112
Member Avatar for ju_10_ve

[B] plz i wont soulotion of my questions by codes : where list is the node pointer for the whole double linked list how i can : 1- add a node after the node that has 30 2- delete a node at the beginning of the list 3- delete a …

Member Avatar for invisal
0
162
Member Avatar for gergep

i have made a opengl gui and would like to share it with the public. Please leave any comments, questions, or anything about this that you have and i will try and answer them. It has included examples and you install it like all of the other API's. Thanks. (Its …

0
54
Member Avatar for k007

This is part of an assignment that I am doing. I have to create a Queue (FIFO) using templates. I have been able to create that and it works. There is one more part to this same assignment where I am unable to figure out how to proceed. Here is …

Member Avatar for k007
0
1K
Member Avatar for gauravmishra

[code] #include<iostream> using namespace std; class sample { static int i; public: sample() { cout<<"base:construcotr"<<endl; cout<<this<<endl; } ~sample() { cout<<"destructor"<<endl; cout<<this<<endl; } sample(const sample &s) { cout<<"copyconstructor"<<endl; cout<<this<<endl; } /* sample operator =(sample s) { cout<<"==operator called"<<endl; cout<<&s<<endl; return s; }*/ }; int sample::i=0; sample fun(sample x) { cout<<"hello"<<endl; cout<<&x<<endl; …

Member Avatar for mrnutty
0
109
Member Avatar for jake43

I have an issue with this assignment, the instructor says that I use the brackets incorrectly that is why the program will not compile. Please provide feedback to correct program. #include <iostream> using namespace std; int main() { system("color 4"); restart: int number, ans; number = rand() % 100 + …

Member Avatar for Salem
0
204
Member Avatar for Laik

Hi guys...I am starting with Qt and I have problems with configuring it. It write: "Start C:/Apps/Qt/demo/demo.exe... This proccess could not be started !" I am using Qt Creator 1.2.1 on Win XP SP2. In code: [CODE] #include <QApplication> int main( int argv, char* argc[]) { QApplication demo(argv,argc); return demo.exec(); …

Member Avatar for Laik
0
72
Member Avatar for cougarclaws

OK, with some help from all of you, I have this working, but I am at a loss as to how to display the number of steps the user asks to show (if they say 10, then every tenth answer displays until the final one) and we need this to …

Member Avatar for cougarclaws
0
128
Member Avatar for group256

Hi everyone, I'm trying to do my assignment, and in there, I'm supposed to use a nested class with which seems I'm facing a lot of difficulties. To make things easy to understand and debug, I made a small piece of code as follows: [CODE]class outter { public: int getID(); …

Member Avatar for Sky Diploma
0
144
Member Avatar for shampoo

Hi everyone . I need to play an MP3 with a microcontroller , this project has 2 parts , one part for reading form the MMC and one part is sending the read bitstream to the decoder IC (VS1003) and i didnt do anything about reading the MMC , it …

Member Avatar for Salem
0
87
Member Avatar for gretty

hi My random number function is meant to loop 6 times & output 6 different numbers. But instead it outputs 6 of the same numbers. How do I fix it? :) Any advice would be really helpful. [CODE=cplusplus] #include <iostream> #include <fstream> #include <cstdlib> #include <ctime> #include <iomanip> #include <string> …

Member Avatar for twomers
0
460
Member Avatar for dub4theworld

I am attempting to alter a Blackjack game so that the game throws an exception and repopulates the deck when their are less than 3 cards per player. I am pretty sure I am on the right track but after 3 hours of trial and error I am still unable …

Member Avatar for Sky Diploma
0
107
Member Avatar for Stefano Mtangoo

Hello guys, I have loaded akrip32.dll and can get handle within a function, but cannot get it when calling the function in main() Please help me app.cpp [CODE=C++] #include <iostream> //testing function below //main application int main() { CDRip instance; DWORD ver = instance.GetVersion(); LPGETCDHAND cdhandle; HCDROM handle ; handle …

Member Avatar for Stefano Mtangoo
0
197
Member Avatar for iamsmooth

So for my comsci assignment, I need to read in this text file with a butt load of messages. Here is what the text file looks like: [code] 1 R Jemma Harry What were you thinking? Harry, You seriously need to stop claiming your paperclip orders under the heading art …

Member Avatar for thelamb
0
116
Member Avatar for gretty

Hello I am making a function that reads a text file stores each line into a string array. My problem is I am getting errors with the function but I do not understand what I am doing wrong or how to fix it? Can you take a look & see …

Member Avatar for mrnutty
0
320
Member Avatar for crazyboy

Hello friends ... I m student. I m thinking to make my career with C++ and/or JAVA. I know little bit about java career and jobs available in market, but i don't know much about C++ career. Is there good opportunities for C++ programmer in market?? Can i get good …

Member Avatar for Ancient Dragon
0
143
Member Avatar for Brandon515

help please ok here is my code [ICODE]void sleep() { energy 100; happy + 20; strength - 1; bladder 70; age + (hour * 8); };[/ICODE] ok? all the varibles are preprocesser defined, you know #define energy 100. i have 2 file in this project main.cpp and Brandon.cpp, the funciton …

Member Avatar for Brandon515
0
138
Member Avatar for seanhunt

Folks, I'm having some trouble with overloading the '<<' operator for a templated class. For example, given a very simple template class like this: [code] template<class T = double> class Real { T m_value; public: Real( T val = 0 ){ m_value = val; } T get() const { return …

Member Avatar for mrnutty
0
134
Member Avatar for nova2177

i wrote a code which should accept only two values, but it seems to accept any values instead. can some show me where i went wrong. sorry about the long code, still a newbie at this. double hr::change_r(double sr) //implementation from class section { dr = sr; if(sr == 17) …

Member Avatar for nova2177
0
109
Member Avatar for cougarclaws

Hi again, My logic is not too good. I am supposed to get this function to be used twice for two different inputs calling the "strings" from within the function and returning the values to main (perhaps my mistake is attempting to call this program twice??? except that is what …

Member Avatar for cougarclaws
0
184

The End.