49,761 Topics

Member Avatar for
Member Avatar for DesiShaddy

Hi, I have a hand of cards(array of cards)....I need to sort that with two criterias [** Value and Suite] Can you guys give me some direction to procede.....I tried using sort() in STL it does not work............ Thanks in advance :)

Member Avatar for WaltP
0
24
Member Avatar for k2k

sorry for creating the same post,, but i forgot the [code] [/code] thing... hi, i am trying to let the user create a file name and past it to the ofstream writer.open() I am trying to keep asking for char until the user hit the enter key then fileName will …

Member Avatar for VernonDozier
0
72
Member Avatar for dbwalters

Hello, I am working on a program that is using the type DATE to develop a class Event to model events scheduled for dates. This might be a familiar question to some, but, I have run into an error during the compile and I need help in debugging it. Below …

Member Avatar for dbwalters
0
105
Member Avatar for snowy_shoryu

can any1 help me to solve the following problem? sorry if i seem noobish because i have no basic in c++ and oop and a new beginner...i'm willing to learn anything.. thank you so much...!!! Question: Ask the user to enter to key-in the inputs from 5 different cars and …

Member Avatar for Ancient Dragon
0
300
Member Avatar for tootypegs

Hi, i need to search for a string in a file. I am trying to use memcmp() but i have never used this before and have no idea how it works. Looking at its description it compares 2 blocks of memory but im not sure this is what i want …

Member Avatar for Ancient Dragon
0
88
Member Avatar for gcardonav

I have this program. It is an example from a book. I am using Dev-C++ and my program just runs and close and I cannot see results. I have two questions 1 - Is the try/catch block ok, becuase it doesn t seem to work sometimes. 2 - How can …

Member Avatar for Duoas
0
199
Member Avatar for k2k

hi, i am trying to let the user create a file name and past it to the ofstream writer.open() I am trying to keep asking for char until the user hit the enter key then fileName will be complete even though all the indexes are not filled... and past to …

Member Avatar for Duoas
0
76
Member Avatar for grmskrk

I saw few similar problems on this forum, but they didn't match exactly what I need. The problem is: given a file with names of cities, their latitudes and longitudes, a program must calculate distance between them. But, it isn't all. A program must create a database of all this …

Member Avatar for superjacent
-1
200
Member Avatar for mikeandike22

I need help with this program im working on where you get input from a file and the program checks if the numbers are in ascending order or not and which one is the smallest and largest number in the series..cant use arrays.. This is a my input.txt right now …

Member Avatar for Ancient Dragon
0
204
Member Avatar for s_mostafa_h

hi all , i want to write a simple programm for cell phone ( Mobile ) programm application , for e.g. i want to unlock or remove password when a user forgot his password for his mobile . for this in visual c++ 2005 , is there help for me …

0
70
Member Avatar for darkprogrammer

im looking for a book or two that will teach me MS Visual C++ 2008 Express Edition and a book that will teach me 3D game programming on it aswell.

Member Avatar for Salem
0
105
Member Avatar for gcardonav

I have the following program and it works but when i try to append to the file, it will not do it. Can anyone help, Thank you GCard [code=cplusplus] #include <fstream> #include <iostream> using namespace std; int main() { char buffer[256]; // open it for output then write to it …

Member Avatar for vmanes
0
94
Member Avatar for MKQ

Hello everyone, I am trying to make a program which takes two integer parameters (HeightinInches,HeightinFeet) i.e. (7,30) and then displays the output by converting it into feet and inches. I am using three operators i.e. +,++, a constant integer number=27. After compilation I got following major errors in which I …

Member Avatar for Duoas
0
98
Member Avatar for missileh

Can i create an application that uses WMI to find hardware information using Visual C++ 6 ?? If yes, then does anyone have sample code?? if yes then do help me out...

Member Avatar for Ancient Dragon
0
76
Member Avatar for hanifa

Hei guys, I have a c++ library of sorts. A user has written a Java Applet and wants to be able to call the C++ library functions. This is something my supervisor proposed. He suggested that Applet via a web service call (AXIS-C++) and using tomcat server , will call …

Member Avatar for schoolsoluction
0
120
Member Avatar for Rehamsk

hi i have a matrices Question should be programmed using C++ so the program is ... you should make the user enter the size of the matrix nxn,,, then he should enter the elements... and then the program should give the user MR infinity....which we use in paths and relations …

Member Avatar for Ancient Dragon
0
185
Member Avatar for k2k

Can anyone tell what cause the run time "Debug Assertion Failed!" error message? it has expression: sizeInBytes>count [code=cpp] int main() { int choice; // for menu choice string option; // for repeat going back to menu option Name name[300]; int i=0; // count do{ cout<<"Welcome!"<<endl; cout<<"1.Get the data"<<endl; cout<<"2.See the …

Member Avatar for ithelp
0
143
Member Avatar for ToolMaker

Hi, I was compiling a code and I had this error: fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411' I 'm using Qt4 which is GUI builder and MSVC2005 Pro on windows xp SP2 I've tried to reinstall all but I still have this error. …

Member Avatar for ToolMaker
0
140
Member Avatar for vinsudhir

Wanted to know if this is possible and if so what it means. 1 typedef struct tree{ 2. int height; 3. int width; 4. int weight; 5. } banyan; 6. int main(){ 7. banyan* count[2]; // This is the statement I am interested in 8. count[0].height = 100; 9. count[0].width …

Member Avatar for Agni
0
103
Member Avatar for CloudKill9

Every time I run this program, I get the number the user inputted printed back on the screen infinite amount of times. According to my CS teacher, he wants us to use basics, no arrays or strings. The user is suppose to type in several numbers followed by -999. Say …

Member Avatar for CloudKill9
0
105
Member Avatar for johndory

Hi, i have just started learning postfix and prefix notations. i was wondering if there is tutorial or something with regards to it here. i was also wondering if there are conversions from postfix to prefix and vice versa. is it available?

Member Avatar for Duoas
0
140
Member Avatar for loushou

Here is my code of the function in questiion: [CODE]void DrawScene(LPDIRECT3DDEVICE9 p_dx_Device, LPDIRECT3DVERTEXBUFFER9 p_dx_VertexBuffer, LPDIRECT3DINDEXBUFFER9 p_dx_IndexBuffer) { p_dx_Device->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,60), 1.0f, 0); p_dx_Device->BeginScene(); p_dx_Device->SetStreamSource(0, p_dx_VertexBuffer, 0, sizeof(OURCUSTOMVERTEX)); p_dx_Device->SetFVF(D3DFVF_XYZ|D3DFVF_DIFFUSE); p_dx_Device->SetIndices(p_dx_IndexBuffer); D3DXMATRIX m_Rotation; D3DXMatrixRotationZ(&m_Rotation, flt_Angle); D3DXMATRIX m_Translation; D3DXMatrixTranslation(&m_Translation, 32, -32, 0); D3DXMATRIX m_World; D3DXMatrixMultiply(&m_World, &m_Translation, &m_Rotation); p_dx_Device->SetTransform(D3DTS_WORLD, &m_World); p_dx_Device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0, …

Member Avatar for loushou
0
556
Member Avatar for hanifa

Hei guys, I have a c++ library of sorts. A user has written a Java Applet and wants to be able to call the C++ library functions. This is something my supervisor proposed. He suggested that Applet via a web service call (AXIS-C++) and using tomcat server , will call …

0
58
Member Avatar for george45

I am writing a program that is supposed to generate 10 random numbers all of them with in the range of [-0.5, 0.5] (the data type that is supposed to be produced by the program are 10 random floating point numbers with in the interval [-0.5, 0.5]). But the problem …

Member Avatar for VernonDozier
0
163
Member Avatar for tamereth

My program works properly under windows, however, it seg faults when I try to compile/run it under linux. [code=c++] #include <fstream> #include <iostream> using namespace std; int main() { char command; char infilename[80]; char outfilename[80]; char fileline[80]; char nextline[80]; char temp[80]; char temp2[80]; char * location; char sentence[250]; int loc …

Member Avatar for tamereth
0
175
Member Avatar for andyg55

I have an array that has read from file as follows: 1 0 0 2 0 0 3 1 2 4 1 2 5 3 0 For the first two lines ( the ones that end 0 0) I want to enter two additional sets of data, so an additional …

Member Avatar for VernonDozier
0
163
Member Avatar for lmastex

Hello guys! Im new in this forum and I hope to say for a long time since I'm new im programming right now. Anyways, I have a big doubt on one assigment I have. I am not going to ask you to do it for me. What I want to …

Member Avatar for Colin Mac
0
136
Member Avatar for mario123

I used turbo c++ to make a program.....the program has lots of different menus with big graphical text (used outtextxy())...the problem is when i run the program, after going thorugh a couple of menus, all the big graphical text (GOTHIC_FONT etc...) changes to DEFAULT_FONT ....what could be a possible reason …

Member Avatar for zhelih
0
108
Member Avatar for Villanmac

Hi am so stuck with the following question, I have input my code at the bottom and it gets me the following display Data items in original order 2 6 4 8 10 12 89 68 45 37 Data items in ascending order 2 4 6 8 10 12 37 …

Member Avatar for Ancient Dragon
0
255
Member Avatar for Master000

Hi I am new here and I got no programming skills at all, but I think this tool is very easy to write. Please do me a favor. This is how the tool works, you open a ini text file. In the ini file there is something called "Weapon" that …

Member Avatar for Ancient Dragon
0
77

The End.