49,761 Topics

Member Avatar for
Member Avatar for scarypajamas

I've have a class function below (using fstream) for my game that I had working on Visual C++ 2008. When I tried to port my app to xcode, I found it compiled, but complained that the directory doesn’t exist. Believe me, the directory exists. I've checked and rechecked! Basically this …

Member Avatar for iamthwee
0
1K
Member Avatar for vs49688

Hey, I am having a really weird problem with my OpenGL Program. When I compile it in Debug mode and run it through Visual Studio 6, it works fine, but when I run it from windows, it works fine until the part where you go to manipulate the camera of …

Member Avatar for vs49688
0
77
Member Avatar for masterjiraya

I feel that all or almost all of the stack arrays needs a stack header... well this is the project target... I need to input a postfix algorithm an check whether it validates or not... I'm not very familliar with headers could some one suggest it for me or make …

Member Avatar for iamthwee
0
120
Member Avatar for chanderk
Member Avatar for Ancient Dragon
0
135
Member Avatar for JackDurden

I know I already posted this but I guess I cant do it the way it was shown. I want a 2-dim array to print out on the same line as string word. I cant seem to figure out how to get a 2-dim array to do this, does anyone …

Member Avatar for Ancient Dragon
0
128
Member Avatar for pusangkinalbo12

make a simple calculator involving the following operations addition, subtraction, multiplication, division, square-root, and percentage!! using c++ program..thankz!! :)

Member Avatar for Aia
-1
42
Member Avatar for pdp8

The following pertains to a Windows XP Embedded system running a single C++ application with administrator privileges. I need the application to read several bytes of data from the BIOS ROM. The data to be read will have been previously stored in the BIOS ROM at a known address when …

0
69
Member Avatar for soppyhankins

Hello again! I am trying to make a jump and run game using SDL, but I am stuck at the jumping part. Whenever I press the Up key, the sprite should go up. However, when I press it, it goes down. I have changed it and done math that should …

Member Avatar for soppyhankins
0
249
Member Avatar for JackDurden

I want a 2-dim array to print out on the same line as string word. I cant seem to figure out how to get a 2-dim array to do this, does anyone know how to do this? [CODE]void Sort(string word[],float grades[][8], int number) { int i,j=o, temp; string aName; float …

Member Avatar for Radical Edward
0
144
Member Avatar for saneeha

Can any one guide me how can i write a byte array to a file.. I am using ofstream class function write().. but it only accepts char*, can any tell me some other function or any way of conversion..ma code is: [code]Byte array[512]; //....the array is initialized using memcpy()....// fstream …

Member Avatar for saneeha
0
881
Member Avatar for ederX

Having a hard time here, Im not great with pointers and arrays yet, can anyone tell me how to properly pass a char array, i thought this was right but the compiler is complaining with: I know the bubble sort is incomplete, i just wanted to quickly test the passing …

Member Avatar for Radical Edward
0
1K
Member Avatar for vulpecula

Hi everyone, I have a opened and read a file in a program that I am working on. I have the following informantion in the file: string intstring intstring intstring intstring intstring int string intstring As you can see, starting with the second string, the string starts right next to …

Member Avatar for Lerner
0
172
Member Avatar for Clockowl

Hi guys, Could you tell me what's wrong with this code? I don't get why the compiler says it can't find a matching function... [code=cpp]#include <iostream> #include <vector> using namespace std; template <class T> int printVector(vector<T> &x){ for(unsigned int col = 0; col < x.size(); col++){ cout << x[col] << …

Member Avatar for Clockowl
0
107
Member Avatar for ++C LOVER

guys! please help me to choose language (c++/J2ME) for mobile application! Actually I decided to do in c++ but some of my friends say it is not a good idea to do it! so please tell me which language I should select for S60 mobile phones to do project and …

Member Avatar for peter_budo
0
144
Member Avatar for scjohnny

b) Create a class called Company which contains a pointer called PtrArr which is used to point an array of employee objects and 1 integer data member. The integer data member will be used to store the number of existing employee currently. [make sure you have a proper constructors to …

Member Avatar for ArkM
0
76
Member Avatar for Clockowl

Hi guys, I'm getting a segfault and I don't really understand why.. Here is the code n, i, quadcount, quadPerVert and quadindex are all (arrays of) unsigned integers. [code=cpp]unsigned int *quadsPerVert = new unsigned int[quadcount * 4]; //(...) vector<vector<unsigned int> > quadsPerVertIndex; quadsPerVertIndex.reserve(quadcount * 4); for (n = 0; n …

Member Avatar for Clockowl
0
115
Member Avatar for death_oclock

I am making a blitting call on my backbuffer: [CODE=C++] BOOL drawImage(IMAGE *lpImage, LONG x, LONG y) { RECT rect; rect.left = x; rect.top = y; rect.right = x + lpImage->lWidth; rect.bottom = y + lpImage->lHeight; dwVideoErrCode = lpBack->Blt(&rect, lpImage->lpSurface, NULL, DDBLT_WAIT | DDBLT_KEYSRC, NULL); if(dwVideoErrCode != DD_OK) { MessageBox(NULL, …

0
69
Member Avatar for glecymay

hello i hope you can help me :icon_question: i just want to know how to code binary value to decimal value using c++ im willing to wait for your response :) thanks a lot godspeed

Member Avatar for glecymay
0
192
Member Avatar for JaksLax

[ICODE] /* * Global Tech's employee system */ #include<iostream> using std::cout; using std::cin; using std::endl; #include "Person.h" int main(){ Person employee("Sue" , "Jones"); cout << "Employee Info " << employee.getFirstName() << " " << employee.getLastName() << endl; return 0; } /* * Person Class Definition */ #include <string> using std::string; …

Member Avatar for cikara21
0
108
Member Avatar for guest7

Hi, I am trying to read the file (f1.txt) which contains : 3 0 -6 0 4 0 -8 0 ... I wish to read the first number from consecutive 2 lines and process them. Following is my code: std::vector<int> row; std::vector<std::vector<int> > two_node; int main() { string line1, line2; …

Member Avatar for Radical Edward
0
234
Member Avatar for coveredinflies

Hi, sorry if this has been asked before I did a search but couldn't find it. How do I define a pointer to a 2D array? (I am trying to pass it into a function). Thanks.

Member Avatar for ArkM
0
447
Member Avatar for matt_hates_code

Ok I'm using the GCC compiler in C . I have a tree style of menu that has been designated function "Manager". I want to return to the top of the tree so basically what I do is at some point from within the "Manager" function I make the call …

Member Avatar for matt_hates_code
0
118
Member Avatar for CoolGamer48

Hey, I'm learning Objective-C, and they use [ICODE]#import "File.h"[/ICODE] instead of [ICODE]#include "File.h"[/ICODE]. The tutorial I'm using says that import is like an include once thing, and it basically implements the #ifndef blocks that's normally done manually in C++. I was just wondering if this is something specific to Objective …

Member Avatar for Radical Edward
0
144
Member Avatar for robertmacedonia

Hello, I was just looking up the threads and I must say I saw a lot of codes with "std::string", "std::cout", etc... I just wanna ask, wouldn't it be better if you just wrote "using namespace std" instead ? I am doing it all the time, but if it's wrong …

Member Avatar for William Hemsworth
0
252
Member Avatar for NekoGráfico

Once the object is copied to the vector the pointer isn't updated. If I use a copy constructor to fix this problem I get awkward results. Could anyone please help me find a solution? Thanks in advance. [code=C++] #include <iostream> #include <vector> using namespace std; typedef struct { void *map; …

Member Avatar for NekoGráfico
0
104
Member Avatar for saneeha

I am using memcpy()function.. memcpy(&_bpb, bBootSector, 512); where _bpb is the variable of structure, bBootSector is byte array the whole progran works fine but at the exit it generates the following error: "[B]Run-Time Check Failure #2 - Stack around the variable '_bpb' was corrupted[/B]." Can any one please guide me …

Member Avatar for saneeha
0
200
Member Avatar for nadiasheikh

Hi, How to achieve hashing in C++? Can you explain this giving a small example? rgds

Member Avatar for CrazyDieter
0
102
Member Avatar for iansane

Hi, I've been looking around for how to execute another application from a c++ app. I remember in VB I could have my app launch the browser or other app and could even have it launch command line with the commands I wanted the system to run. I have found …

Member Avatar for iansane
0
267
Member Avatar for Manutebecker

I want integers 1-52 to be drawn only once, so every "card" will be seen and not one picked twice, heres the code [code] #include<iostream> #include<time.h> #include<string> #include<stdlib.h> using namespace std; class Player{ int hand; }; int main() { srand(time(NULL)); int deck=53; int *drawn; int notdraw[52]; for (int n=1;n<53;n++) { …

Member Avatar for JaR
0
114
Member Avatar for arun_lisieux

Hey ppl, Im trying to solve some problems for topcoder website for practice purposes. But the compiler shows the following error for the codes i've been compiling. I have no problems compiling these codes with Borland C++. I've posted the errors and code below. Errors: Your code did not compile: …

Member Avatar for arun_lisieux
0
171

The End.