49,761 Topics

Member Avatar for
Member Avatar for SquirrelProdigy

[CODE]if(cmd=="new"){ string name,desc; cout<<"Name? "; cin>>name; Setcursor(Conloc); cout<<"Desc? "; cin>>desc; Setcursor(Bodyloc); Invitem Item(name,desc);[/CODE] When the values of the string desc is set through cin, if a space is used, all text after that space isn't used. Also, If two words are used when setting name, it will give the second …

Member Avatar for subtronic
0
270
Member Avatar for winbatch

Hi, I'm trying to use the STL map class to be able to store keys and associated values. I started out using it with keys of pre-existing data types like int, string, etc. and was working fine. I was also able to use it with values of custom classes. I'm …

Member Avatar for Narue
0
448
Member Avatar for kittie

[code]//project.cpp compiles //Need to create an input file of recently shipped music CD's. //The file should consist of the name of the album, quantity shipped and price. // Since we do not know how many CD's have been shipped, keep reading the file //until all CD's have been read in. …

Member Avatar for alc6379
0
229
Member Avatar for silicon

Hello everyone, my code is finally complete thanks to all of your help. One questions I have is regarding the reslts. I thought that Merge was faster than a heap sort. In my results however (when run on Borland c++) Heap comes out with a faster sorting time. The functions …

Member Avatar for subtronic
0
159
Member Avatar for bsrivastava

[I][COLOR=Red]Moderator edit: This response and its replies have been split from the C and C++ Timesaving Tips sticky because they do not add relevant material, and they are long enough to distract from the intended purpose of the thread. Further replies on this topic may be posted in this thread, …

Member Avatar for Narue
0
215
Member Avatar for hasan2003

hi, can any one tell me where can i get a idl compiler? i know about [B]idlc[/B] but i cant find any link ... help please ...

0
99
Member Avatar for the b

Here is a quick question that should be easy to answer. Is there a cubed root function in the C++ library?

Member Avatar for Narue
0
213
Member Avatar for winbatch

As seen in another thread, I'm working on a Log class. I'm running into an issue that if I delete the file that's being written to, the Log class doesn't detect it and continues to 'think' it's writing even though the file is gone... (Note that this is on sun …

Member Avatar for subtronic
0
2K
Member Avatar for nizar4445

hello all can any body help me to correct this code please :cry: :cry: i want it so it can print whats n is in these different cases. this is my code and thanks alot for your help #include <stdio.h> #include <iostream.h> #include <stdlib.h> void main() { int ave, 1st, …

Member Avatar for sinrtb
0
304
Member Avatar for Raza

im going to make an operating system...after completing my boot and kernel work....not i have just created a simple c++ program for my os....now i wan to convert that c++ .cpp into .bin so i can write it into floppy sector...bcoz my os will be base on floppy disk... question …

Member Avatar for subtronic
0
139
Member Avatar for Digital Reaver

I need help writing this program i have everthing set up except i cannot get the program to save the output from it. Here is a copy of my work (It will most likely suck Im new at this sorry.) Any help will be very appreciated. I need the file …

Member Avatar for winbatch
0
105
Member Avatar for bl4ckch3rry

Hi, i searched around and couldn't find any examples on what i'm looking for.. Im a newbie when it comes to Winsock (C++) and im not sure what im doing wrong, if you could just point me in the right direction or provide some source code that'd be very helpfull, …

0
149
Member Avatar for kittie

[code] //project.cpp //compile error-price undeclared (first use this function) #include <iostream> //don't I have it declared in the float line?? #include <fstream.h> #include <stdlib.h> using namespace std; int main() //PROBLEM: Create an input file of recently shipped music CD's. The file should consist of // the name of the album, …

Member Avatar for kittie
0
206
Member Avatar for bobr_1013

When this program runs, I can enter in the name the first time through the while loop (using "cin.getline). When I go through the second time, it skips the name and asks to enter the ss#. The first time through, everything works fine. [code] #include <iomanip> #include <iostream> #include <fstream> …

Member Avatar for vegaseat
0
225
Member Avatar for rohitmc

hi i am new to this forum and my major is computer science...this is the best thing i found on the web yet....i will try to help you out anyway i can.....i need help on this program...thanks 1. create a dynamicarray to hold the first 10 odd intergers. now create …

Member Avatar for rohitmc
0
200
Member Avatar for hessa

Hi, This program supposed to ask the user to enter the names and the ID numbers and the number of children the employee have, the search shoud work like this taylar 845 3 john 123 2 sara 526 2 **search by name** the user should enter the employee name he's …

Member Avatar for hessa
0
236
Member Avatar for subtronic

These two languages, for the most part, are completely different; especially now. From culture to paradigm. So let's get a seperate C forum going.

Member Avatar for subtronic
0
293
Member Avatar for nathanj99

HI. Hopefully I can resolve this now with your help. simply, I want to write a String to file. I have been trying it with fstream. The string comes in the form of AnsiString from a c++ Edit component. Can someone provide some code to do this. Since I cannot …

Member Avatar for Narue
0
303
Member Avatar for peter_budo

Studying Computer Science on Unix platform is ussually fun expect days when you get stuck. And life get [B]tough[/B], this is one of my tough days. To make life easier with my c++ programming I wanted to use the [B]make[/B] tool under unix. I have 5 fieles : - student.h …

Member Avatar for peter_budo
0
209
Member Avatar for Rose Aashii

Hye. i write this code to get inpur from user such as ram and hard disk capacity as integer type using structures. After that i want to create a file in which i want to save that data. In the code below it is getting input from user but not …

Member Avatar for alc6379
0
142
Member Avatar for nathanj99

HI I am trying to write and read to file. I am experimenting with a small piece of code before going onto my main program. I am simply trying to write a float variable and a String variable to file using fstream. The variables are float version; Edit1->Text (this is …

Member Avatar for Narue
0
155
Member Avatar for Acidburn

[php]#include <iostream> using namespace std; class Wheel { public: Wheel(int size); int getDiameter(); protected: int diameter; }; Wheel::Wheel(int size) { diameter = size; } int Wheel::getDiameter() { return diameter; } class Bike : public Wheel { public: Bike(int f, int b); int getFrontsize(); int getBacksize(); bool operator==(Bike ); private: Wheel …

Member Avatar for Narue
0
193
Member Avatar for mindsvelte

Hi, I'm new here and wanting to learn C++ to a professional standard. I've been a programmer for 20 odd years mainly on mainframes using COBOL, Easytrieve, JCL etc, assembler and Databases. So some of you guys may appreciate that I like to see the code that does the manipulation. …

0
84
Member Avatar for nathanj99

Hi, I really need some help. I need to write a structure to disk in c++ builder. I have been trying now for a couple of weeks and I am now about to give up. I have tried fread,fwrite etc. fstream as well as TFileStream with no luck. I have …

Member Avatar for Narue
0
203
Member Avatar for phredi++

i have written a console application in c using borland c++. i want to include mouse capabilities in the program ie. run the program using the mouse just like in norton disk doctor(dos-based version). any help? :?:

Member Avatar for phredi++
0
210
Member Avatar for feda

Greeting , it will be helpful if any one can provide me with Round Robin algorithm code in c/c++ thanks in-advance

Member Avatar for Narue
0
191
Member Avatar for apurva agarwal

can any one provide me with the round robin algorithm code in c/c++ hurry up!!!

Member Avatar for Narue
0
334
Member Avatar for tat2dlady

Can anyone tell me why this is printing doubles out to the output file? [CODE] IndexFile.seekp(20, ios::beg); for (i = 0; i < NumOfSlots; i++) { if (RandomFile.peek() == 42) { Position = i; RandomFile.seekg(37, ios::cur); //cout << Position << " "; } else if (RandomFile.peek() != 42) { RandomFile.get(R.SSN, …

Member Avatar for tyczj
0
218
Member Avatar for Rose Aashii

I write the folowing code which is taking RAM and Hard disk capacity from user by using structures and than saving it to a new file after the user complete entring data it is displaying data entered by the user by opening that file. Problm is that i want to …

Member Avatar for Narue
0
156
Member Avatar for Tlhokomelo

Hello, I am new to the oop enviroment and I am more interested in using c/c++ but I can not afford to buy books on the subject. I would be extremly grateful to any one or group that can send me some c/c++ material of sort. Or tell me of …

Member Avatar for Narue
0
145

The End.