49,756 Topics

Member Avatar for
Member Avatar for jdpjtp910

I am writing code for homework. It is an inventory program using a stack class and a inventory class. When I complile I get the following error: Below is my code thus far. Error 2 error C2512: 'InventoryItem' : no appropriate default constructor available c:\inventory.cpp 17 chapter18 Here is my …

Member Avatar for Narue
0
181
Member Avatar for roneh96

I think I may have bitten off more than I can chew with this. I'm writing a program that will figure out the last position standing by continuously counting the positions using prime numbers till only one is left. [url]http://acm.uva.es/p/v100/10015.html[/url] is a link to the original problem. the code I …

Member Avatar for daviddoria
0
134
Member Avatar for mane.ashwini

my problem stmt is as follows my input to the program is text file which contains records like 10 20 30 40 70 20 30 70 30 40 10 20 29 70 80 90 20 30 40 40 45 65 10 20 80 45 65 20 like this and i …

Member Avatar for daviddoria
-1
114
Member Avatar for atmc

Hiii again i have done dis program but i get o/p like dis 1 2 3 4 5 6 7 8.... I need to get like dis 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21[code]#include<iostream> using namespace …

Member Avatar for daviddoria
0
76
Member Avatar for KUMAR_2010

Device an algorithm to test whether the three numbers represents the side of a right angle triangle

Member Avatar for daviddoria
-1
32
Member Avatar for kiramat khan
Member Avatar for sandorlev

Hello! I'm planning to make an online program, actually it would only be a login system with GUI and a chat window after login. The client program would recieve some data from the server (like names, ages, etc). I don't want to use C++ for sockets, I want to use …

Member Avatar for dusktreader
0
234
Member Avatar for Dewey1040

I'm writing a game where I create a map using ncurses. What I want to try and do(if possible) is make the map the size of the terminal, in other words in the main program I have: [code=C++] // Create a game on an 80x30 map Game gameInstance( 80, 30 …

Member Avatar for Dewey1040
0
250
Member Avatar for bablo

I am doing a project in Image Processing using C++. I need to get the RGBA values of a png image. I am able to get RGB values. but I couldnt get Alpha part. Pls help me out... Thanks in advance..

Member Avatar for daviddoria
0
43
Member Avatar for goulda660

I'm haveing trouble with this program I don't know what the problem is because my compiler says that their isn't one but the console says their is but it wont give me lines my code is very long too. [ICODE] #include <iostream> #include <fstream> #include <vector> #include "Clear.h" namespace fun{ …

Member Avatar for goulda660
0
209
Member Avatar for riotburn

Hi, I have written a program for reversing a digit but I get "error C2664: 'strcpy' : cannot convert parameter 2 from 'std::string' to 'const char *' Which I don't get since strcpy is supposed to change a string to a char array. Any clues for whats going on here? …

Member Avatar for riotburn
0
326
Member Avatar for m-lamaa

dears i'm new to c++ and i'm trying to make some demos application now i'm buildin an application that use http connection to make http request and get a return value from URL example: use [url]http://www.mywebsite.com/somthing.aspx[/url] this URL should returm a simple string value how i can read this value??

Member Avatar for siddhant3s
0
142
Member Avatar for anuragcoder

Hey guys, sorry for the bad rep. But, recently i've obtained a code in c++ which highlights c# syntax in a Richtextbox. [URL="http://www.c-sharpcorner.com/UploadFile/duncanharris/SyntaxHighlightInRichTextBoxP212012005044912AM/SyntaxHighlightInRichTextBoxP2.aspx"]LINK[/URL] I think the basic idea behind it is to specify an array of strings, and now the program should search and highlight the defined strings in a …

Member Avatar for iamthwee
0
133
Member Avatar for umairch

can any one send me C++ code for 2-3-4 tree insertion, deletion and search code plz...[I]email snipped[/I]

Member Avatar for daviddoria
-7
53
Member Avatar for vthokie11

I need to implement Huffman coding using a binary tree. I have successfully created the tree and have been able to execute the program by manually entering the characters and their frequencies but I now need to read the characters/frequencies from an input file and then output their matching Huffman …

Member Avatar for daviddoria
0
138
Member Avatar for nola_Coder

I successfully had one enemy wandering back and forth in between collision blocks in my platform scroller. Unfortunately, I'm running into problems when trying to drop multiple enemies across the map. I basically made 7 additional enemies and gave them different starting positions across the map, but the program crashes …

Member Avatar for daviddoria
0
94
Member Avatar for new2programming

Hi i have been following this tutorial [url]http://jnrdev.72dpiarmy.com/en/jnrdev3/[/url] in which all the code is supplied if you need to have a look. I am wanting to add another player- how would i go about doing this. I have a player.cpp and a player.h in which i think i need to …

Member Avatar for daviddoria
0
72
Member Avatar for new2programming

How do you create a tile based collision detection map for visual C++? i have the code to implement it i now want to change the layout of the map

Member Avatar for daviddoria
0
71
Member Avatar for ollie60

I am trying to create a function that takes in a sorted vector of integers, loops through the vector and if there is a value in the vector that is repeated it deletes that entry. This is what I have so far and I am not too sure how to …

Member Avatar for shahramjaved
0
693
Member Avatar for yongj

In my header file I have: [CODE]#include <iostream> #include <string> using namespace std; class Customer { public: //Output void displayLabel(ostream &out);[/CODE] And in my main: [CODE]#include <iostream> #include <fstream> #include <string> #include <iomanip> #include "Customer.h" using namespace std; Customer cust; string blank = " "; string line; int start, end, …

Member Avatar for mitrmkar
1
162
Member Avatar for new2programming

Hi i am trying to make a jump and run game in Visual C++ using SDL I have been following a tutorial([url]http://jnrdev.72dpiarmy.com/[/url]) which was very good but finished before everything was covered. In a game lik mario, the players will navigate over jumps and onto ledges ect. I am using …

Member Avatar for Hidden_mistakes
0
191
Member Avatar for JameB

I just made a program that takes input from the parallel port(or printer port) of a computer and translates that input to English/Numbers. Its a Morse Code Transmitter translator and a Morse Code Calculator. Anyways, so I have to write a writeup about the program and I am kinda confused …

Member Avatar for Nick Evan
0
103
Member Avatar for Alex_

I'm trying to make the container to work with one of my classes. But i don't understand what should the overloaded operator contain. Maybe this is because i don't know the container too well... Please give me some insights. This is my class [code=C++] class Complex{ private: int re; int …

Member Avatar for mitrmkar
0
160
Member Avatar for bobsta

Hi I have just started using STL vectors and iterators so please excuse my ignorance. Suppose I have three classes A,B and C such that : std::vector<A> aObjects wherein each object "a" comprises a vector of "b" objects which in turn comprises a vector of "c" objects ie. [CODE]class A{ …

Member Avatar for Banfa
0
283
Member Avatar for shereefatef

Hello everyone i'am tring to write a program that convert expression from infix to postfix using stack. but i have a problem with my code it terminate the program i can't determine what is wrong but it seems to be in the (precedence) function . so can anyone help me …

Member Avatar for iamthwee
0
156
Member Avatar for manishwadhwa22

hi i was wondering if anyone could show me how to put graphics to the following card game as i want to learn how to add graphics and what type i should use like for example: DRAC or is there something even better, cheers: [CODE]#include<cstdlib> #include <process.h> #include<ctime> #include <iostream> …

Member Avatar for Ketsuekiame
0
149
Member Avatar for godflesh231

when i run my code i get one, and i can't tell which part of my code is faulty as VC++ points me to this code from <xlocale> [code=c++] _CRTIMP2_PURE facet *__CLR_OR_THIS_CALL _Decref() { // safely decrement the reference count, return this when dead _BEGIN_LOCK(_LOCK_LOCALE) if (0 < _Refs && …

Member Avatar for mitrmkar
0
159
Member Avatar for sleepybug

hi.i m trying to this program for QuickSort but unable to detect what's wrong in it..probably the prblem is in Divison.. so here's the code:icon_eek:: [CODE] # include <iostream> using namespace std; # define N 20 int Divide(int a[],int left,int right) { if (right < 1) return 0; int i=a[left], …

Member Avatar for abbasshahrokhi
0
106
Member Avatar for tinanewtonart

In this program we are going to simulate a simple card game. The rules are that the player selects a card out of a deck of 52 cards. The computer picks a random card out of the deck. The person with the highest card face number wins. In this program …

Member Avatar for kvprajapati
0
6K
Member Avatar for darkangelNeo

[CODE]#include<fstream.h> #include<conio.h> void main() { int iSize,iChoice,iDelete,iMem={1024}; clrscr(); cout << "Brand New Flash Drive\n"; cout << "Message: Free Space: " << iMem << ""; getch(); clrscr(); while(iChoice!=8) { cout << "\n"; cout << "[1] Format Flash Drive\n"; cout << "[2] Copy File\n"; cout << "[3] Delete File\n"; cout << "[4] …

Member Avatar for Ketsuekiame
0
250

The End.