49,761 Topics

Member Avatar for
Member Avatar for mar000m

hello all..... i was asked to perform a program of a calculator using stacks........ so i'll be so glad if any one have any simple ideas that helps...we need to read equations from the keyboard or files with no spaces in between, we must separate the numbers from the operators …

Member Avatar for mar000m
0
257
Member Avatar for fallen_prisoner

i wrote this code originally with "command1" as a string and it worked fine but when i changed it to a char the "if (command1 == "open")" and other checks stopped testing true... any idea or hint would be appreciated... program just checks input against a list of "if" statements …

Member Avatar for Ancient Dragon
0
113
Member Avatar for star289

I have this assignment and I got most of the program but I cant seem to make the counter work right what am I doing wrong? [code=cplusplus] #include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; int main() { int num1, num2, number; cout << "Please enter an …

Member Avatar for star289
0
92
Member Avatar for Nepenthe8

Hi all I need help with C++, I need to develop a class specification and an irregular polygon application. I am stuck and don't know what to do.I have tried to solve it but it keeps giving me errors. If anyone is kindly to help me out, I would be …

Member Avatar for iamthwee
0
118
Member Avatar for nurulshidanoni

I have this to file.First [B][U]ayam.txt[/U][/B] 10 20 30 60 90 50 40 [U][B]and itik.txt[/B][/U] a b c d e f g h i How to call read and write the ayam.txt and itik.txt into one file. which first i would like to cout the ayam.txt and then itik.txt.

Member Avatar for scarface3288
0
145
Member Avatar for jmines

I am trying to make an array of strings in C++. The problem is this that i need the strings to be multiline. Is this possible in C++? how can we do it?

Member Avatar for jmines
0
86
Member Avatar for k2k

can anyone please point out what's wrong with the files linking? i have this compiling errors: 1>c:\documents and settings\lih\my documents\visual studio 2005\projects\employee\employee\hourlyemployee.cpp(3) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\documents and settings\lih\my documents\visual studio 2005\projects\employee\employee\hourlyemployee.cpp(4) : error C2550: 'HourlyEmployee' : constructor initializer …

Member Avatar for Ancient Dragon
0
126
Member Avatar for lookforlohith

[code=cplusplus] #include<iostream> using namespace std; class item { int itemno; int itemprice; public : static int total; void getprice(); void printprice(); friend void calculate(item a); }; int item :: total=0; void item :: getprice() { cout<<"Print item number \n"; cin>>itemno; cout<<"Print item price \n"; cin>>itemprice; total++; } void item :: …

Member Avatar for lookforlohith
0
643
Member Avatar for gehad3003

Hi I finally upgraded a code for password i hope you like it. [CODE] #include <conio.h> #include <iostream> using namespace std; int main() { char *tempPassword = new char; cout << "enter your password: "; char ch = _getch(); int j = 0; while (ch != '\r') { if (ch …

Member Avatar for Narue
0
127
Member Avatar for Amy

Hello there, I will soon start programming with DIGITAL Fortran V6 developer studio at Univ and would like to install the same software in my machine at home. I have been told that in order to create and debugg projects from a FORTRAN environment I need to have MS Visual …

Member Avatar for paoconnell
0
229
Member Avatar for richasr1

Hi, I'm relatively new to C++ Builder and the language itself, and my code is now becoming quite long. I was looking to take advantage of using a seperate class for certain methods, however I've come across a problem. Here's an example of my code in the new class; [INDENT][CODE]TShape* …

Member Avatar for richasr1
0
350
Member Avatar for rukshenaa

hai everybody!!!!!!!!!! how to read data from a text file and store into an array......... can anyone help me with the coding in vc++...............

Member Avatar for twomers
0
108
Member Avatar for spoorthisri

Please help me how to write into XML file using VC++ 6.0 this is example code where i am not able to write the data into XML File this is ScanComputer.cpp where i am trying to try into XML file [code=c++]void CScanComputer::saveParameters(const char *filename) { ParamIO outXml;//ParamIO.h is pasted below …

Member Avatar for spoorthisri
0
248
Member Avatar for rukshenaa

hai everybody!!!!!!!!! how to read data from a text file and store in to an array........ can anybody help me with the coding in vc++............

0
67
Member Avatar for Ints

I have a c program that I need to use in dos 5 but i haven´t found a way to do so .Programs that work perfectly in Win XP console window, will not work in dos.Does anyone know : What do i have to add to my code so it …

Member Avatar for jephthah
0
128
Member Avatar for gretschduojet1

Hey everyone, I haven't been here in sometime but I'm in need of some guidance. One of the questions I have is how do I enter the name, length, and time for each course? Thanks in advance for the help. Here's what I'm supposed to do: Using OOp inheritance and …

Member Avatar for Agni
0
125
Member Avatar for uncertainty

How do I insert variables with data type as DOUBLE? like in the code below, it is how you insert strings into mysql [CODE] myconnection->myquery->SQL->Clear(); myconnection->myquery->SQL->Add("insert into users (user,pass,email)"); myconnection->myquery->SQL->Add("values ('"+user->Text+"', '"+pass->Text+"', '"+email->Text+"')"); myconnection->myquery->ExecSQL();[/CODE] in this statement: [CODE]myconnection->myquery->SQL->Add("insert into users (user,pass,email)");[/CODE] user, pass and email are fields of users table, …

0
72
Member Avatar for roachic

Hi everyone. I'm trying to get a vertical scrollbar to work on my CDialog. I followed the instructions on [URL="http://support.microsoft.com/default.aspx?scid=kb;en-us;262954"]this link[/URL] and copied the code exactly into my class. It compiled fine. But when I ran it, the Vertical scrollbar disappeared. And I've double checked that my vertical scrollbar is …

0
63
Member Avatar for roachic

Hi everyone. I am trying to generate a certain number of sliders on my CDialog, that certain number is not fixed. I managed to make the sliders appear fine by doing this: [code]for certain length{ [INDENT]CSliderCtrl *tracker = new CSliderCtrl(); tracker->Create(WS_CHILD | WS_VISIBLE, CRect(left, top, right, bottom), this, i);[/INDENT] }[/code] …

Member Avatar for roachic
0
112
Member Avatar for blcase

Hey, i dont need any specific help but i was wondering if anyone could help me generate an idea for my project. basically i have to use queues, deques, and stacks in a programmable way. The exammple that was given in class (which we can't use) is a librarian takes …

Member Avatar for Jacky1
0
101
Member Avatar for Jacky1

Hi I'm trying to test my code but I keep getting some kind of strange errors bst.hpp: In member function `void Bst<generic>::insert(generic) [with generic = int]': test_BST.cpp:30: instantiated from here bst.hpp:36: error: invalid conversion from `int' to `int*' bst.hpp:47: error: ISO C++ forbids comparison between pointer and integer bst.hpp:52: error: …

Member Avatar for Jacky1
0
2K
Member Avatar for bbfree

I use the C++ Builder 6. When I change ItemLIst in ComboBox, ItemIndex is dumped. How to make that an old value in ItemIndex keep automatically.

Member Avatar for Ancient Dragon
0
74
Member Avatar for veronicak5678

I am trying to write a program with a Month class that will take a month as input, then display the previous and next month. It should use overloaded prefix+++ and -- operators and postfix ++ and -- operators. My month is decrementing, but when it should display the incremented …

Member Avatar for veronicak5678
0
105
Member Avatar for ElectorCount

I have a question regarding random number generators. I have already looked at the thread teaching me how to generate random numbers. My question is, is there a way for the generator to only generate one number 4 times? i am trying to randomly generate a deck of cards where …

Member Avatar for VernonDozier
0
333
Member Avatar for Nemoticchigga

Hey, I am using visual studio 2005 to make a console application to talk over TCP/IP ethernet. I am using winsock2.h, but am getting linker errors. For example: error LNK2019: unresolved external symbol "public: __thiscall CWinsockInterface::~CWinsockInterface(void)" (??1CWinsockInterface@@QAE@XZ) referenced in function "void __cdecl `dynamic atexit destructor for 'WinS''(void)" (??__FWinS@@YAXXZ) I have …

Member Avatar for Ancient Dragon
0
70
Member Avatar for Brent.tc

Hi all, I have a few general questions that need answering: 1) Is there a way for an application to run a few final commands before it closes (this one is for all applications, not just windows) 2) Is it possible for a window to 'see' the application that sends …

Member Avatar for Ancient Dragon
0
140
Member Avatar for R3B3L

I need help storing data in archives, I always get an unhandled exception when i try... [code=c++] #include"Inventory.h" #include"CustomerTransaction.h" #include <fstream> using namespace std; CarInventory* car_list; int main() { SLL<Customer>* customer_list = new SLL<Customer>; car_list = new CarInventory(); fstream file; file.open("Models.txt", ios::in); if (file.fail()) { cout << "\nFailed to open …

Member Avatar for Salem
0
80
Member Avatar for computer engW

I have some questions ,i can't solve it .The first one is, Write a C++ program using the switch statement that does exactly what the following program does: [ICODE] #include <iostream.h> #include <math.h> void main () { float number; int choice; cout<< "Enter you number"; cin>> number; cout << "Enter …

Member Avatar for computer engW
0
129
Member Avatar for 666kennedy

i know that the AND command is && but what are the code for OR? also if i have a program looping through a system and i want to add something to a variable each time through would [CODE] ERRORtotal += ERR1 [/CODE] work? or wat would

Member Avatar for iamthwee
0
173
Member Avatar for Jennifer84

I think I just did found this out: [code] Put.str(""); [/code] How is it possible to ´emty´ a std::stringstream. In this case Put contains: 10. [code] std::stringstream Put; int i = 10; Put << i; [/code]

0
223

The End.