51,593 Topics
![]() | |
I made a library (.lib) with VS2005. Is there a way to convert it to a .a linux library without moving the code and setting up a project and compiling in linux? Thanks, David | |
the purpose of my assignment is to create a program using arrays and strings, with functions and parameter passing. i'm sort of having trouble with it anyway, but i'm currently stuck on the "load" function that i'm supposed to write. i've already written the isFull and addMessage (which i'm not … | |
Hi, i need help with my c.w i know this is not the right place to ask but i have no other choice ! I had a friend who was suppose to help me to do this but went to holiday and now i have till 3rd april to submit … | |
Okay so I have have been beatting my head againest the wall and I can not get this to work right. I have asked my insttor and she does not know why it will not work righ either. I read in numbers as characters and then I place them in … | |
/tmp/ccSx0L0H.o: In function `employee::getdata()': multi.cc:(.text._ZN8employee7getdataEv[employee::getdata()]+0x31): warning: the `gets' function is dangerous and should not be used. | |
Hi everyone, I generate in a for loop: 1- An array made of random numbers 2- Add the elements of the array and store the result in a number S 3- finally write in a .txt file the number j(number of time that the for-loop has been executed) and the … | |
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] | |
I dont know how long I've been trying to figure this out but I havent got to an answer.... I believe that there must be a way of converting an integer to a double or visa versa but I cant think how... I always thought parseInt or parseDouble wud work … | |
hi , my program calculate the area of rectangle , and I have some errors , and dont know how to correct them . this is the program , [CODE] #include<iostream> using namespace std; class Rectangle { private: double length ,width ; public: double getW(); double getL(); void setW(); void … | |
Hello, I'm sorry if this has been asked before, but I didn't seem to find any answers. I'm trying to write a function that would delete a specified number from a singly linked list. This is what i've got so far, but it's not working: [code=c++] void remove(list*& start, int … | |
I have this data 1 2 3 4 5 6 7 8 9 10 0 1 0 9 0 0 5 0 0 3 How to count rowwhich have value only? Which the answers is only 4 column which have value? something like this I do. [code=C++] a[i]=total; total=a[i]+temp; myfile<<"\t"<<total<<setw(5); … | |
Can you please suggest a code optimization tool for C other than the compiler ? | |
I have a structure in which there are three float variables, and in a bigger program, I'm using an array of these structure objects. Now, I thought that each time in a loop when I was using values of these structures, I was creating a new copy of those objects … | |
I wrote this a little while ago... I know i need to add a file check so overwrite does not occur but I am interested in learning to write clearer and less amatuer code. Any serious note would help... this program creates a file with an input name, saves text, … | |
In an attempt to improve my coding skills, I decided to program a very simple DOS calculator. However, when i try and compile the program, I am presented with with following: [CODE]------ Build started: Project: Basic Calculator, Configuration: Debug Win32 ------ Compiling... Basic Calculator.cpp c:\documents and settings\my documents\visual studio 2008\projects\basic … | |
I have a major problem. I need to write a program using linked lists that will display... A B C D E F and then... F E D C B A without using a tail pointer. When I run the program, it displays the first set of letters but crashes … | |
Hi guys! I have started writing a program for phonebook which will add, delete, search, display and sort the information of a person. information will include firstname, lastname & phonenumber. now I was testing the first part of the program which adds a contact. but my loop is not doing … | |
I am new to C++ I recently been trying to write an Game data base in C++ but I succesed in nothing though the Code seem to be all right it always shows me error messages this is the Source Code i created for this program: [CODE] #include<iostream.h> #include<conio.h> #define … | |
This came up in another thread. I gave some advice that I'm not longer sure of. Rather than hijacking that thread, I figured I'd start my own. I advised against using the == in that thread. The context was this: [code=cplusplus] string subChoice =""; getline(cin,subChoice); if (subChoice == "100") { … | |
I need help with an assignment I am working on. Here is the assignment: count all the even numbers between X and Y, where X and Y are entered by the user. Do not include X and Y. EXAMPLE 1: Please enter an integer: 0 Please enter another integer: 10 … | |
Im very well a beginner and I cant quiet grasp classes. I found that this topic is all over forums and I have decided to give it a whirl and I am stuck. Here is what needs to be done. You should create a class called ComplexNumber. This class will … |
The End.