49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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? | |
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 … | |
[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 :: … | |
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 … | |
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 … | |
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* … | |
hai everybody!!!!!!!!!! how to read data from a text file and store into an array......... can anyone help me with the coding in vc++............... | |
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 … | |
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++............ | |
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 … | |
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 … | |
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, … | |
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 … | |
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] … | |
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 … | |
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: … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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] |
The End.