49,755 Topics
![]() | |
hello ..... please how can i write a function (PRINT) that takes a stack of integer and print its elements? | |
Here is the input.txt file that I have. [code]2 5 -2 3 1 2 4 0 1 2 1 0 [/code] These are 2 polynominals. 2x^5 - 2x^3 + x^2 + 4 and x^2 + 1 while <3,5> : 3 is the coefficient, 5 is the degree. I just can … | |
Hello, I am in a process of making an adventure text-based game and I was wondering if it's possible to change the text color on the go. What I mean is that normally, your text would be white, but when you advance in the story (e.g. advance on lines), the … | |
Hi, This is lokesh from india,completed B.tech (computer science). Right now looking for job. me positive thinking and very confident not over confident. my hubbies are playing chess and traveling long trips and love to make friends around world. | |
I want it to do the following: Ask for a number between 1 and 5, if user inputs anything lower, higher, or something that isn't a number, it should give an error message and then ask for a input again. This code will spam the error message forever, what have … | |
Hello, I have a problem which goes like this. I need to be able to design a simple class, which i have done, and it must represent any numeric value, which includes a decimal and negative value. So i need to overload the operators, because the '%' will make an … | |
[CODE]#include <iostream> using namespace std; class NumDays { private: double hours; double days; public: NumDays(double h=0) { hours=h; days=h/8.0; } void setHours(double h) { hours=h; days=h/8.0; } double getHours() const { return hours; } void setDays(double d) { hours=d*8.0; days=d; } double getDays() const { return days; } NumDays operator … | |
I'm making a Sudoku game. When reading in from a file, I would like to convert all of my "0" to blank spaces. However, no matter what I do, those "blank spaces" always turn to "32" because, that's the value of a space on the ASCII Table. How do I … | |
I've been learning C/C++ and I'm currently doing an ATM project. It all works fine but I would like to improve it so when i quit the program and it will load the data used previously. currently I use a struct like this [CODE]struct database { int pin, sort, account, … | |
Hi, Can someone help me with the CURL library using GCC on Cygwin? I can't find anything in the documents that explain exactly how to compile with g++. For instance: g++ -I curl CurlSample.cpp gives me errors such as: /tmp/ccrXZUYr.o:CurlSample.cpp:(.text+0x17): undefined reference to `_curl_easy_ init' I'm using gcc version 4.3.4 … | |
Hi all.. I am using windows XP with vision studio C++ 6.0.. my software is using CAsyncSocket communication with TCP/IP.. during sending and receiving signal / data.. my software always face communication cannot delivered to server.. sometimes OK..sometimes not.. I called CAsyncSocket::Send(...) function to send data.. sometimes able to send, … | |
Hi, I'm trying to use an input device like a joystick as a mouse, and I've got some good behavior for desktop use by polling the state of the device in a loop and doing some work with the values, then using SendInput with some INPUT structures to make the … | |
Hey, I'd appreciate if someone would help me modify this code so the descending order can be displayed on the screen , here it is.... [CODE] #include <iostream> // ostream #include <vector> #define SIZE 10 using namespace std; int partition(vector<long unsigned int> & a, int start, int end) { unsigned … | |
Hello, everybody! I am kind of new to the forums, and I will do my best to follow the rules when posting a new thread. I am to create a program that is supposed to generate 30 random integers between 10 and 200, and insert them into a Heap. The … | |
hello I have a piece of code starting like that: [CODE] #include <iostream> #include <conio.h> #include <stdlib.h>[/CODE] When I have try to compile this with g++ with a command as:[B] g++ new.cpp[/B] I get this error: new.cpp:2: fatal error: conio.h: No such file or directory I couldn't find where is … | |
Next project in my C++ course is to create a class Polynomial to add, subtract, multiply by a scalar, and multiply by another polynomial. I've written my code, and it works fine when I run it, but there's an application that is provided by our instructor to compare my .exe … | |
So, when I run the program and try to list all the information I get an interesting error message that pops up: ----- Debug Assertion Failed! Program: ...ocuments\Programs\C + + Programs\Checkbook\Debug\Checkbook.exe File: f:\dd\vctools\crt_bld\self_x86\crt\src\tccpy_s.inl Line: 19 Expression: (((_Src))) != NULL ----- Though I have an idea that it probably has something … | |
I have a couple of C++ labs that I need to finish before the end of the semester and I have been beating my head against this computer for days and I am not getting the code to work. I need some serious help. I need to get these done … | |
Can anyone see any way of improving this? [CODE]//____________________________________________________________________________________________ // START #include <iostream> using namespace std; int maxQ, total1; //____________________________________________________________________________________________ // CLASS(ES) class Queue { int array[]; public: //variabes int count; //constructors Queue(); Queue(int q); //functions void add(int i); void take(); }; //constructors initialization Queue::Queue(int q) { array[maxQ]; count = … | |
Hi all I'm having a List of Entity's here which I would like to traverse. I want to call the function DisplayEntity for every node. Here's the catch: I have expanded the Entity class (same name different namespace) to have SDL data and methods. So basicly what I'm trying to … | |
Hi everybody, this text turned out to be rather long and maybe not so clear, please excuse me. I'm currently using the winsock library to send and receive data in an application made with WinAPI, I'm not using MFC. I'm using asynchronous sockets (I think that's what it's called) which … | |
Have a choice to input 3 letters S or P or Q. I need to convert them to upper if user inputs lower cased letters. | |
I am just wondering if there is a way to put the following code into a loop or two so that it is easier on the eyes and doesn't take us so many lines. I have not been able to think of a way to do this with so many … | |
Using Data1.txt and Data2.txt, create two control break reports. The first should break on name and report the highest frequency style or styles. Send the report to result1.txt. Include appropriate headers. The second should break on style and report the total quantity ordered for that style. Send the report to … | |
Im an IT student(just started) we had this basic assignment: Antivirus Suppose you are going to create an antivirus program. You will need to search a file for any trace of a virus and if found it should be removed. However, a backup of the original(“infected file”) file should be … | |
hello guys...I have this library file which is error free since it builds successfuly. Now when I include this file into a DLL (after setting all the neccessary paths), more than 95% of the 166 error are comprised of these two errors [CODE] error C4430: missing type specifier - int … | |
I'm creating a Sudoku game, and according to the rules of Sudoku, there cannot be the same number in any row or column. My question is this: How do I compare a value with an entire row or column in an array? For example: I have a 9x9 array that … | |
Hello this problem is from the beginner book C++ Primer Plus 5th edition.. The problem sounds something like this: Write a short program that asks for your height in feet and inches and your weight in pounds(Use three variables to store the information). Have the program report your body mass … | |
I am suppose to use arrays where i read in data from a text file and i have to set these functions to it. any clues on how i would approach it. my main concern is how to read data from a file using class while using arrays. i know … | |
i am having errors when i compile this code such as: main_class.h(31) : error C2228: left of '.x' must have class/struct/union 1> type is 'float' main_class.h(31) : error C2228: left of '.y' must have class/struct/union 1> type is 'float' main_class.h(31) : error C2228: left of '.z' must have class/struct/union This … |
The End.