49,761 Topics
| |
I am figuring out game development and deciding whether i should develop a game as a final project of grduation. Although i learnt c++, C#, Java etc. but I didn't covered any specific course/subject in my academics for game development. I love Games but I am completely a newbie in … | |
[CODE]#include<iostream> #include<fstream> #include<string> #include<vector> #include<algorithm> using std::cin; using std::cout; using std::string; // clothing codes struct codes { char code; const char* explanation_1; float total_sales; }; codes CODES[]={'A',"BABY WEAR",0.0F, 'B',"CHILDREN WEAR",0.0F, 'C',"LADIES WEAR",0.0F, 'D',"MENSWEAR",0.0F, 0,NULL,0.0F }; struct RECORD { char category; int item_number; float price; }; const string filename="jualan.dat"; int menu(); … | |
I want to start learning OpenGL. Codeblocks decided to break, so I downloaded Dev-C++ instead. I've tried loads of different websites to try and figure out how to install it, and I get some type of error every time. How should I install it with dev-c++? | |
Hello, See the picture: [url]http://img513.imageshack.us/img513/7496/errorps.png[/url] See the code: [CODE] #include <windows.h> #include <stdio.h> bool stamina=false; void LosHacks() { while(1){ if(GetAsyncKeyState(VK_F6) &1){ //F6 stamina = !stamina; } if(stamina==true){ DWORD dwPlayerPointer = *(DWORD*)0x00F37074; if(dwPlayerPointer != 0) *(float*)(dwPlayerPointer + 0x10 + 0x2C) = 100; } Sleep(50); } } BOOL WINAPI DllMain(HINSTANCE module, DWORD … | |
Hi guys, I've been struggling for days to do this. I've got 2 form. The first form (Form1) is to assign a variable (Result) a value. Another form (DisplayResult) is to display out the value. Actually, my purpose is to learn how i can use global variables to share information … | |
How do I stop this from happening in SDL [URL="http://i.imgur.com/D6M2X.png"]http://i.imgur.com/D6M2X.png[/URL] where the background just stops. I want it to carry on too the left for ever or atleast the width of the image on the SDL_Surface here is a video to showcase the problem [URL="http://www.youtube.com/watch?v=KROV7eq8RLo"]http://www.youtube.com/watch?v=KROV7eq8RLo[/URL] and here is the code … | |
Hye all; I want dataReader to read int values into integer variables. Which conversion do i need. Please help?? [CODE] while(reader->Read()) { temp_string = reader["ID_varchar"]->ToString(); // OK } [/CODE] What about code below ? [CODE] while(reader->Read()) { temp_int = reader["ID_int"]->GetInt32(); // ERROR } [/CODE] | |
I've been fiddling with some boost spirit stuff, and my code seems to start infinitely looping somewhere in the standard library stuff. Any ideas what's wrong? The qi::phrase_parse works very well, but the karma gets me. [code] #include <iostream> #include <string> #include <vector> #include <algorithm> //#include <boost/spirit.hpp> #include <boost/spirit/include/qi.hpp> #include … | |
Hi guys, again, coming to this forum for asking some confirmation of my knowledge confusion. firstly, let's take a look on the code:- [CODE] #include <iostream> using std::cout; using std::endl; int main() { // main process const int value_1 = 1000; const int *pointer_1 = &value_1; const int **pointer_2 = … | |
Hi, I've just learned that Java's 'protected' access specifier has a different effect than that in C++. So is there a way to make a member of a base class visible to its inheritors but not globally? Dean | |
I don't understand what is wrong with this. This is the line with the error: `}while(playAgian());` Thank you :) #include <iostream> #include <string> class Ice { public: void hit(int playerLoco, int iceStrenth, int loco1, int loco2, int loco3); int strenth; class Loco { public: int location; bool hit; }; }; … | |
| Hi, I'm learning C/C++ at school and we have our vacations; thought I might do some programs on my own. I've landed at trouble with sorting numbers in a 1-D array at the time of insertion. It seems to work up to a certain point, after which it fails to … |
Hello everybody I [I]thought[/I] I understood inheritance but it turns out I don't. I am creating an SDL/OpenGL mini-GUI library. I have a master class, GUIComponent, with subclasses such as TextLabel under it. I have a vector called guiList that is initialized as [ICODE]std::vector<GUIUnit*> guiList[/ICODE] (it's extern'd and initialized elsewhere; … | |
Hey everyone (especially Narue!), I've ventured over to the C++ board again. I've been reading my C++ book (Data Structures and Algorithms in C++) again and want to fully grasp the concept of pointers. In the back of each chapter, a couple of exercises are available and I'm attempting to … | |
Okay - Now I am beginning to get a bit frustrated. I have a project that builds perfectly and I just want to duplicate it so I create a new project with the new name that I want to call it. When It shows me the empty space to start … | |
write a program to accept the salaries of 10 employees from the user and display them in descending order for all the employees,if the user enters zero, the program should display the message"the amount should be greater than zero" and accept the value again. [CODE]#include <iostream> using namespace std; class … | |
so, this is my coding. [code]#include<iostream.h> #include<fstream.h> #include<stdlib.h> #include<iomanip.h> using std::cout; using std::cin; using std::endl; struct menu typedef struct menu RECORD; void addRecord(RECORD input[], int arraycounter); void printRecord( input[]); void printAllRecord( input[]); int main() { fstream submit; submit.open("D:jualan.dat",ios::out); { int menuEnter; int arraycounter=0; do { cout<<"\tFamily Outfit Shop"<<endl; cout<<"\t MAIN … | |
K. I've put up with this issue for long enough and have decided to solve it once and for all. Halp? For those who dont know what i'm talking about, its the damned VC++ error "Resource file *.ico is not in valid 3.00 format" ^^headache. Googling doesn't help. I made … | |
Hi There, here is tricky (for me) issue: 1. Windows 7, SP1. 2. I have lots of C++ redistributales in C:\Wimdows\winsxs like 'x86_microsoft.vc80..' and 'x86_microsoft.vc90..'. So I do have them installed but when I check if I have them 'legally' installed using all possible uninstallers including native one I do … | |
hi , can anyone provide the code of insertion ,deletion, search of AVL ?? sorry, im still bigginer in c++ language.. Thanks | |
After figuring out my past problem (no instance of an overloaded function), I've come across another problem. [IMG]http://i.imgur.com/SvX1l.png[/IMG] I've pinpointed the code where I know the error is originating from: [code] static int Decode_VL64(const std::string &data){ char* chars = (char*)data.c_str(); return Decode_VL64(data); } [/code] What I'm trying to do here … | |
create a menu driven application that accepts the salaries for ten employees and display the following information: 1)max salary 2)min salary 3)avg salary 4)number of employees whos salary is greater than 1000 5)the salaries in ascending and descending orders. [CODE]#include <iostream> using namespace std; class Max { int marks[10]; public: … | |
Hi, not so much into software design patterns [further - SDP], so while learning this "thing" i have some issues with trying to combine multiple SDP. I think that there are some logical issues.. Thank you for your time! :) [CODE] #include <iostream> using namespace std; /*the Command interface*/ class … | |
problem: five students pick five balls, but they must not choose the same ball this program does not work i dont know what is wrong. [CODE]#include <cstdlib> #include <iostream> #include <stdio.h> #include <conio.h> using namespace std; int main(int argc, char *argv[]) { int i; int student[5] = {0}; int ball[6] … | |
I Wanted to create a Live Audio Broadcaster by which i can transmit Audio from a local computer to a webserver . Which all programming languages can be used to make it and how can i make it . Any Help will be Appreciated . | |
I'm using SDL to make a game and I'm using frame independent movement, everything works fine with no gravity or acceleration: [CODE]boxOffsetY += yVel * ( DELTA.get_ticks() / 1000.f );[/CODE] The box moves accordingly, no matter what frame rate i use. But when i try to add gravity: [CODE]yVel += … | |
I know that by default member functions of a class are inlined [CODE] class d { public: int a() { return 1545435; } }; [/CODE] And I also know that it's not allowed to declare functions in headers unless they are inlined. Is there a way to declare a function … | |
Hi guys, I have written a program that writes a .csv file readable in Microsoft excel. Is there a way I can launch the file with Microsoft excel once I compile and run the program? [CODE] #include <iostream> #include <cstdlib> #include <fstream> #include <cmath> using namespace std; int main() { … | |
I cant seem to find anything useful on the web except adding outside libraries for this one help is required. I wrote a program that you can say builds a database of users and their passwords. the program loads the users from an existing file already into a hashtable. now … | |
Hi, I am a newbie in C and have this question with char pointer; [code=c] char * s = "hello world"; *(s+1) = 'a'; [/code] This is throwing a segfault error. Should'nt this work since I am modifying only one memory location. Also I have seen such code on the … |
The End.