49,755 Topics

Member Avatar for
Member Avatar for eagle_isea

hello ..... please how can i write a function (PRINT) that takes a stack of integer and print its elements?

Member Avatar for Jason Giggs
-1
61
Member Avatar for muffle

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 …

Member Avatar for muffle
0
182
Member Avatar for Norzog

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 …

Member Avatar for Clinton Portis
0
90
Member Avatar for lokis

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.

Member Avatar for AndreRet
0
183
Member Avatar for sha11e

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 …

Member Avatar for Jason Giggs
0
105
Member Avatar for aviavyne

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 …

Member Avatar for Clinton Portis
0
253
Member Avatar for knellgust

[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 …

Member Avatar for jonsca
0
99
Member Avatar for brycematheson

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 …

Member Avatar for xikkub
0
147
Member Avatar for berwick53

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, …

Member Avatar for taylorc8
0
173
Member Avatar for JeremyJ

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 …

Member Avatar for JeremyJ
0
723
Member Avatar for shizu

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, …

0
77
Member Avatar for taylorc8

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 …

0
102
Member Avatar for pichi20

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 …

Member Avatar for pichi20
0
1K
Member Avatar for Toxic_Rice

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 …

Member Avatar for Toxic_Rice
0
230
Member Avatar for newbiecoder

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 …

Member Avatar for skorm909
0
112
Member Avatar for gnarlyskim

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 …

Member Avatar for Calista Flock
0
2K
Member Avatar for rebellion346

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 …

Member Avatar for rebellion346
0
221
Member Avatar for CHawk619

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 …

Member Avatar for CHawk619
0
146
Member Avatar for digan

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 = …

Member Avatar for arkoenig
0
93
Member Avatar for PieterA

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 …

Member Avatar for PieterA
0
190
Member Avatar for kerp

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 …

0
177
Member Avatar for nickx522

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.

Member Avatar for WaltP
-2
66
Member Avatar for Philosophy

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 …

Member Avatar for Philosophy
0
419
Member Avatar for cshemby86

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 …

Member Avatar for cshemby86
-3
202
Member Avatar for fubuaddict

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 …

Member Avatar for Fbody
0
78
Member Avatar for muze

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 …

Member Avatar for SgtMe
0
110
Member Avatar for brycematheson

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 …

Member Avatar for Fbody
0
117
Member Avatar for flasp

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 …

Member Avatar for flasp
0
1K
Member Avatar for notmasteryet

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 …

Member Avatar for muze
0
144
Member Avatar for Tiancailee

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 …

Member Avatar for Tiancailee
0
131

The End.