49,761 Topics

Member Avatar for
Member Avatar for sartann

am a new in c+= and i hve to do those two functins : strcpy and atoi functin....if anyone can help plz reply thanx alot

Member Avatar for Ancient Dragon
0
73
Member Avatar for shenmue232

Hi guys Ive been having problems with calculations on arrays. What i want to do is times two numbers in an array for example: 4 x 4 = 16 Here's what i'm trying to do double timeArray[3]; cin >> timeArray[0]; cint >> timeArray[1]; answer = timeArray [0] * timeArray[1]; the …

Member Avatar for shenmue232
0
294
Member Avatar for aggagier

I know you use printf to print to the screen. What would I use to send the file to a printer using C++

Member Avatar for ithelp
0
205
Member Avatar for atish00

I am making a quiz show in C++ I need help in storing the answers of a quiz in a array like [QUOTE]cout<<"Q.1 Who is Known as the lady with lamp ?"<<endl<<endl; cout<<"A. Sonia Gandhi "<<"B. Florence Nightngle"<<endl; cout<<"C. Mother Tersa "<<"D. Madame Rozario"<<endl<<endl<<endl;[/QUOTE] So how do I Input the …

Member Avatar for ithelp
0
110
Member Avatar for Jakiro

[B][/B] If the user input a equation something like 2 + 2 * 2 + ( 2 - 2) infix expression. how i collect the data to stack? using string? someone can give the algorithm. I don't have idea to get the input.

Member Avatar for iamthwee
0
139
Member Avatar for Underdog67

Here's the code: [code] #include <iostream> #include <fstream> #include <iomanip> using namespace std; const int MAX_EMPLOYEE = 500; enum PayType{H, S}; struct EMPLOYEE { int idNumber; char name[21]; double payRate; short int numberDependents; enum PayType; }; int LoadMaster(EMPLOYEE& record); int main(){ int count; EMPLOYEE record; count = LoadMaster(record); cout << …

Member Avatar for iamthwee
0
113
Member Avatar for swiftdemise

Hi, I'm having a problem with vectors. I have [code=c++] vector<int> ds; [/code] in a header file. When I do [code=c++] ds.push_back(0); [/code] in the cpp file, I get a seg fault. Does anyone know what the problem is? Thanks

Member Avatar for swiftdemise
0
137
Member Avatar for almost_done

Ok I have no idea why I'm getting this error. I'm guessing its the fact I'm trying to return something from another class but I don't know how else to do it. [code=C++] #ifndef Floor_h #define Floor_h #include <queue> #include "Passenger.h" using namespace std; class Floor { public: Floor(); void …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for sbenware

My program keeps crashing when the retrieve function calls the getName function. I'd like to make sure my getName function is correct before tinkering with my retrieve function. I'd appreciate any ideas. Is there a problem with deleting the name if it's a pointer? header file: [code] void getName(char * …

Member Avatar for sbenware
0
88
Member Avatar for k2k

hi all, I am trying to figure out how to read from a file, ifstream reader reading string next.... if next is a digit then add it to total... and cout total.. please indicate what went wrong. thank you. [code=cplusplus] # include <iostream> # include <fstream> # include <cstring> # …

Member Avatar for Lerner
0
96
Member Avatar for hotshayan

Actually im a beginner with the subject of data structures. for my project i got a program to make which goes like: " implement the ADT unordered dictionary using hashing with linear probing." by using c or c++ language. i would b grateful if sum1 could help me with this …

Member Avatar for Ancient Dragon
0
130
Member Avatar for roxanne14

My assignment says I'm supposed to read in an address all on one line separated by pound signs (eg jane doe # p.o. box 123 # new york, new york 97229 #) and output it with correct capitalization and in proper address format like: Jane Doe P.O. Box 123 New …

Member Avatar for Tight_Coder_Ex
0
552
Member Avatar for prateek_singh

//sample program for car:) #include<graphics.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<process.h> void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\tc\bgi"); int c=12; setbkcolor(0); //setlinestyle(0,1,2); int t; while(1) { settextstyle(2,0,5); outtextxy(100,10,"Press L,H ,T,P"); outtextxy(100,30,"Press 1 for Quit"); as: setcolor(13); ellipse(380,127,20,152,130,35); //////////////////////////////rear////////////////////////// line(490,109,560,142); line(560,142,569,142); line(569,142,582,102); line(582,102,620,92); line(593,132,617,125); line(617,124,627,96); line(620,92,628,97); line(472,86,602,96); line(501,113,575,121); line(443,77,475,80); line(443,77,432,93); line(475,80,472,85); //setcolor(4); line(593,132,593,137); line(593,137,600,141); …

Member Avatar for Salem
0
178
Member Avatar for Jakiro

void Display(Productptr t) { Productptr g; g=t; if(t==NULL) cout<<"The list is empty."<<endl; else { cout<<"Code\tDescription\tPrice\n"; cout<<"====\t===========\t=====\n"; while(g!= NULL) { cout<<g->code<<"\t" <<g->description<<"\t\t" <<g->price<<endl; } cout<<"End of the list"<<endl; } system("pause"); } This code give me problem. When I show 1st time is ok. After 1st time I add something or delete …

Member Avatar for Jakiro
0
72
Member Avatar for Ravenous Wolf

here is a question which some would consider silly but i would still love to ask. what are the chances of C# or java replacing c++ as the gaming language? more and more books are being written about game design in C#. c++ has the advantages of being fast and …

Member Avatar for maddog39
0
182
Member Avatar for Thunder2k4

Hi, im currently trying to write a program which counts the characters in an input file. I need it to count the total characters, the non-blank characters and the alphabetic characters. And then show the statistics of each. I have both the total characters and alphabetic characters working correctly but …

Member Avatar for Thunder2k4
0
276
Member Avatar for ZORG

I want to develop a database application for the DS. Which is the best C++ package to use? When I was last involved with programming, Microsoft and another development company that I cant even remember now had the top two products. My current research has made me realize that there …

Member Avatar for jbennet
0
81
Member Avatar for LanierWexford

Is there a function to remove punctuation from a string, or check to see if a char is a letter? This is a home work assignment to: 1 Write a class stack and a class queue 2 Test your classes by writing a program that will ask the user for …

Member Avatar for LanierWexford
0
1K
Member Avatar for tootypegs

Hi, basically i want to parse an image of a small FAT SD memory card that i have aqquired to display its directory structure. Ive tried scowering the web for some information or resources to study but i cn't find anything. Does anyone know of any info available to allow …

Member Avatar for tootypegs
0
79
Member Avatar for Max_Payne

[b]Code[/b]: [b]NumeroReal.h[/b] [code] #pragma once #include <iostream> #include <cmath> #include <cstdlib> using namespace std; class NumeroReal { private: double n; public: NumeroReal(); // default constructor NumeroReal( double n ); // parameter constructor NumeroReal( const NumeroReal &unNumeroReal ); // copy constructor ~NumeroReal(); // destructor void setNumeroReal( double n ); double getNumeroReal() …

Member Avatar for Max_Payne
0
122
Member Avatar for Tell Me

Hi, I want to ask if there function in library of c++ to search word in file ?? thank you

Member Avatar for Tell Me
0
241
Member Avatar for hpr12951

Hello~I am having trouble with my homework. I could not have them done. Please Please help me with it. Thank you all. God bless... The question is ""Add temporary, administrative, permanent, and other classifications of employees to the hierarchy from the three coding. Implement and test this hierarchy. Test all …

Member Avatar for ithelp
0
121
Member Avatar for aloh

Hi, I'm quite a beginner and not sure if I can be helpful in the future. But I'll try! anyway, here is my problem... I've been searching on the net & looking up books but still don't have a clue of how to get it work. I have to simulate …

Member Avatar for Salem
0
129
Member Avatar for Tamarce

I am am for the first time here,since it is the first time I needed help.I have read all the rules and I agree with you for the homework case...But this is getting frustrating!I am working on this on my own,practicing for the mid term but what am I doing …

Member Avatar for Tamarce
0
303
Member Avatar for volia

o.k., so as i stated in my first post, I'm very new to this, and not very good at it. I have been able to get though the labs up to this point. But I am having some issues with my final lab. One thing I want to make clear …

Member Avatar for WaltP
0
135
Member Avatar for mattp123

Hey guys I need some help on this code. I'll just post the parts of the code needed to do thing I'm stuck on. [CODE]class Robot { public: // Constructor Robot(Arena* ap, int r, int c); // Accessors int row() const; int col() const; // Mutators void move(); private: Arena* …

Member Avatar for Lerner
0
78
Member Avatar for curt22

Hello, I'm following this tutorial [url]http://fox-toolkit.net/cgi-bin/wiki.pl?Tutorial__Simple_Window[/url] To learn how to make gui programs using the fox toolkit, but I can't get it to compile. This is what I have in main.cpp [code] #include <fx.h> #include "mywindow.h" FXDEFMAP(MyWindow) MyWindowMap[]={0 }; FXIMPLEMENT(MyWindow,FXMainWindow,MyWindowMap,ARRAYNUMBER(MyWindowMap)); int main(int argc,char ** argv) { FXApp application("Tutorial #1","FOX Tutorials"); …

Member Avatar for curt22
0
155
Member Avatar for driplet

I need to input a space, a tab, and a comma from keyboard and then judge if the input is a space, a tab, or a comma. I used the following code but it doesn't work. bool ST, COMMA; AnsiString HH; HH = Edit1->Text; strcpy(CR, HH.c_str()); if (CR == " …

Member Avatar for Narue
0
4K
Member Avatar for DemonSpeeding

I believe what I have written at the moment is a singly linked list, and I can't figure out how to delete whatever node the user specifies, I've toyed around with it but I'm stumped. Here's my specification file: [code] #include<string> using namespace std; class Node { Node *prev; Node …

Member Avatar for Narue
0
226
Member Avatar for jimFan

Dear all, Is it ever possible to write a programme in C++ which enables me to: 1) Read the data in spreadsheet of MS-Excel 2) generate another Excel file as output ? Also, are there any standard library could do the job? One of my friend said using Visual Basic …

Member Avatar for miketillman
0
1K

The End.