49,766 Topics

Member Avatar for
Member Avatar for starbucks_life

I am working on the menu of a 3D symbian3 game.I am trying to load a png image of size 91 by12 using GFloat(opengl function) vertices_of_image[ ].....but the text in the image is coming out to be wrapped around. i.e.if my text contains ROCKS...then a portion of the alphabet S …

0
70
Member Avatar for theguitarist

[CODE] int x,y; while(cin>>x>>y) { if(x>y)cout<<x<<"\n"; else if(y>x)cout<<y<<"\n"; } [/CODE] This seems clear,but when I entered this: [CODE]2 4 6[/CODE] and hit enter, I get this: [CODE]4[/CODE] after which I am being asked to enter something again. I put 8, and it prints 8. But what is exactly happening here? …

Member Avatar for WaltP
0
492
Member Avatar for Nor96x

I'm looking for a method of packing all the files of my applications into one archive, and the ability to extract & load them into memory at runtime with C++. I've tried googling it, but I'm not sure if I'm searching with the right criteria because I'm not finding much. …

Member Avatar for vijayan121
0
91
Member Avatar for montjoile

I have this structure: [CODE] typedef struct nodo{ int dato; struct nodo *izq; struct nodo *der; }nodo; typedef struct nodo *avl; [/CODE] I have this method: [CODE] void insertar(avl *r, int dato){ if (*r==NULL){ *r=(nodo*)malloc(sizeof(nodo)); (*r)->dato=dato; (*r)->izq=NULL; (*r)->der=NULL; [/CODE] All this code works perfectly. My question is about the line: …

Member Avatar for montjoile
0
118
Member Avatar for element432

Im trying to have this program continue to run when you enter y or Y at the end or quit when you enter n or N. Everything I try either has it just end or continue to repeat. Any help would be great, thanks! [CODE] #include <iostream> #include <cmath> #include …

Member Avatar for element432
0
173
Member Avatar for thierrypin

I have this problem: I have a data structure called DACT, that I convert into a string line and send to another computer. I have a file full of DACTs, and I need to send them all to another computer. When I send only 100, it works fine, but when …

Member Avatar for thierrypin
0
187
Member Avatar for Muhammad Anas

I just downloaded a document containing some pointers exercises. The statement of One of its questions is as follows: [COLOR="Green"]Write a function that returns a pointer to the maximum value of an array of double's. If the array is empty, return NULL. double* maximum(const double* a, int size); [/COLOR] It …

Member Avatar for Muhammad Anas
0
1K
Member Avatar for Suzie999

How can I get a new line in messagebox? I have two TCHAR arrays, I can print both to separate MB but not both to one This is what I'm looking for (if you can understand what I'm trying) It obviously does not work. [CODE]TCHAR one[] = _T("file\\path\\here"); TCHAR two[] …

Member Avatar for Suzie999
0
431
Member Avatar for pok.kys90

my professor gave a .o file and we are supposed to write a function that links to his file in ssh. his code is struct grades { int lab; int prog; int mid; int final; char name[10]; } void fillArray(grades a[ ], int & num); these two are given and …

Member Avatar for VernonDozier
0
211
Member Avatar for pok.kys90

I am new to c++ and i am supposed to do a test case using my stub with hand calculated mean & standard deviation of number of students that are saved in the .o file in linux. my code is [code] #include <iostream> #include <fstream> #include <cmath> using namespace std; …

Member Avatar for pok.kys90
0
244
Member Avatar for moshe12007

Hello!!! I read 3 c++ books on dos and what now? I think i want now to programming on windows but which language i can programming ?

Member Avatar for mrnutty
0
189
Member Avatar for JimSim

Hi all I think that I should start this by saying that I am fairly new to C++. Currently, I can only write basic OOP programs. However, I have been given a task at work to compile and link some old code that we have (roughly 10 years old) to …

Member Avatar for JimSim
0
278
Member Avatar for forumposters

I need to write a main() function, that loops over a bunch of numbers from 0 to 100, calls another function called isPrime() for each of them, and print out the numbers that are prime. I'm new to C++ and any help would be appreciated.

Member Avatar for yashsaxena
0
796
Member Avatar for Pascode

Hi, I've been trying for the past couple of hours to get this modal dialog box working, it is basically supposed to ask for text input and once entered will open a message box with that text. At this point though I'd be happy to just get the box up …

Member Avatar for cool_zephyr
0
246
Member Avatar for leetari

Hi there, I am working with a 2D array, my c++ program reads input from an external file and stores it into a 2D array. Say, for example, this is my input file: 9 5 6 2 4 1 0 8 6 7 3 5 2 9 5 8 My …

Member Avatar for leetari
0
4K
Member Avatar for Muhammad Anas

Hello guys, I am trying to declare a two dimensional array in C++ on runtime. For this purpose I am asking the user about how many rows and columns should be created in the array. I have written the following code for this purpose. Apparently it is working just fine. …

Member Avatar for Muhammad Anas
0
157
Member Avatar for Labdabeta

I need to make a function: [CODE]void GenerateNormal(float x[3], float y[3], float z[3], float &ox, float &oy, float &oz) { //Calculate coordinates for a glNormal and return them ox,oy and oz }[/CODE] I have a sinking feeling that the math will be quite difficult. Can anybody help me?

Member Avatar for Labdabeta
0
125
Member Avatar for zeronis

Hi! Using string, ifstream and ofstream object. Compiling - ok, but give a run-time error after printing Name in ReadData() function. My Person class include only one string member "name" and function "Name()" which return string object "this->name". And constructor with string parameter of course... [CODE]#include <iostream> #include <fstream> #include …

Member Avatar for Narue
0
221
Member Avatar for theguitarist

[CODE] cout<<(char)290<<endl; [/CODE] I get " as the answer. [CODE] cout<<(char)20000<<endl; [/CODE] Here I don't get anything. When char can take integer values from -128 to 127 and both 290 and 20000 are welll out of this range, then why is there an output in the first case?

Member Avatar for pseudorandom21
0
127
Member Avatar for lochnessmonster

i dont see the point or why you would ever want to upcast an object for example class Shape { ..... }; class rectangle : public shape { .... }; int main() { rectangle object1; Shape *shapePtr = &object1; return 0; }

Member Avatar for thekashyap
0
188
Member Avatar for ztdep

Dear friends: I am working on a C++ computational geometry code, and i want to make sure whether two points are the same by comparing their x y and z coordinates. The coordinates of the points are in the double formate. since the pc can not represents the double number …

Member Avatar for ztdep
0
1K
Member Avatar for ichigo_cool

I'm just wondering what kind of free SQL API I should use to connect with c++ so I can use a database with my programming to make it a lot nicer and more neat for my objects... I've done a bit of search and fount things like ADO or ODBC... …

Member Avatar for Ancient Dragon
0
141
Member Avatar for thecoolman5

hey, I was recently programming my own variable equation solver in C++ and out of nowhere, my computer crashed and all my code was erased. My computer booted up just fine but none of my code was there. i dont have the guts to start all over again. I dont …

Member Avatar for thecoolman5
0
179
Member Avatar for Psyho

Hi I am in a bit of trouble. what is nedded: Reading a text file character-by-character, using the "get(char)" function. Count the words in the file which contains "w" or "W". The possible delimiters are: '\t','n',' '(space). Do not use arrays. The codes: [COLOR="Red"]MAIN.CPP[/COLOR] [code] #include <iostream> #include "enor.h" using …

Member Avatar for Labdabeta
0
195
Member Avatar for warrior4321

Hello, I am very new to C++. I am learning the language by myself. I tried to make a program where the user inputs how old they are (in terms of years) and the program will output how old the user is, in terms of months. The problem I am …

Member Avatar for warrior4321
0
130
Member Avatar for shyla

I need to verify with some one if my code is right i have to submit it in 3 hours from now and any help will be welcome The instructions are: Using an appropriate definition of listnode, design a simple linked list class with only two member function and a …

Member Avatar for fatima mustaf
0
713
Member Avatar for Mr. K

I created my own Pong, but the ball is not moving. I don`t have any error in my error list. In this game I used time.h to move the ball. Why the ball is not moving? What is wrong with my code? Thanks in adbvance [CODE]#include <allegro.h> #include <time.h> int …

Member Avatar for raptr_dflo
0
106
Member Avatar for maxicube

Hey there, was wondering if anyone else has this issue. I've checked to see if it was my drivers, but no. the GL window wont move, it won't accept any inputs at all. but it shows everything else. I've tried everything in my memory bank.. and still nothing. this is …

Member Avatar for maxicube
0
148
Member Avatar for QuesoTaco

I am studying viruses and trying to figure out how the FLEX module works for C++. I have taken classes before on regular languages, context free, etc. Is FLEX dealing with regular languages or regular expressions, and also what is the difference exactly? Could you give an example of how …

Member Avatar for gusano79
0
233
Member Avatar for zenv0id

Hello, I'm a C++ newbie with the following problem (I've used the search function but haven't come up with what I'm looking for. I'm not asking anyone to write this project for me, but a lot of good pointing/ideas is going to help me a lot): I currently have a …

Member Avatar for WaltP
0
117

The End.