49,761 Topics

Member Avatar for
Member Avatar for Carrots

Hi, I have a linked list which stores base class pointers (which point to derived type objects). I'm trying to give this option to the user: [code=c++] cout << "Press 'n' then Enter to show next, 'p' then Enter for previous and 'q' then enter to return to menu" << …

0
75
Member Avatar for ihatestarch

So on the last day of class, I've learned about vectors. They seem like linked list, which seem like arrays. They are all pretty much containers that will hold some object of some data type I believe. Why would someone use one vs. using the other? And is there one …

Member Avatar for ihatestarch
0
139
Member Avatar for 101ani.sh

Why turbo C++ compiler is not supporting in laptop(compaq CQ40,lanova 450) ????...........Is there any other compiler that support for laptops??????????

Member Avatar for zobadof
-1
86
Member Avatar for digital_ice7

[CODE]#include <iostream> using namespace std; void pop(int s, int n) { for (int l = 0; l < n; l++) { for (int i = 0; i < n; i++) { cout << s[l][i] << "\t"; } cout << endl; } } int main() { int n, num; cout << …

Member Avatar for mrnutty
0
90
Member Avatar for zobadof

Hello I would like to start learning allegro but need some suggested sites, please help!

Member Avatar for zobadof
0
96
Member Avatar for FanatiK

Hi, this is pretty much my first post here. I just started learning C++ about a week and a half ago and I started working on a program that could compare pixels on the screen to see which letters they form (kind of like OCR). I probably know what you're …

Member Avatar for FanatiK
0
895
Member Avatar for ihatestarch

Studying for the final and can't remember the details behind the copy constructor. I know what it does, just don't know the "why" behind some stuff. Here is an example of a copy constructor I have. [CODE] Person::Person(const Person& aPerson) //m_variable=private variables { m_name = aPerson.get_name(); m_pBirthDate = new Date; …

Member Avatar for ihatestarch
0
77
Member Avatar for asSer

We need to create a program w/c print the payroll of a small company for a particular month. then...... We will be provided the employee name (20 chars) hourly rate(2 digits) and number of worked in a month(3 digits). COMPUTATIONS: GP=hourly rate * hours worked withholding tax is 12% of …

Member Avatar for Nick Evan
0
84
Member Avatar for kirennian

Hi there. I'm currently attempting to create a vector of structs whereby the struct itself contains a vector. The problem I am having is upon creation of the struct itself, throwing the following error. error:C2075: 'Target of operator new()' : array initialization needs curly braces. [code=c] struct DISPLAY_DEVICE_CAPABILITIES{ vector<int[3]> resolutions; …

Member Avatar for kirennian
0
210
Member Avatar for rivzzz

How to code for a 3D rectangle and how to scale or translate in visual C++ ?please someone help...

Member Avatar for mrnutty
0
24
Member Avatar for fummy

Can someone help please! I need to search for a different set of strings like: 'fummy' or 'users' or 'logon' from a directory like this: C:\mycase\Nic..\ A Text document is stored in there LIKE: 544, Text Document, 45, 588 KB Can some help to write a script or python program …

Member Avatar for zortec
0
105
Member Avatar for yakovm

[CODE] class Key{ public: float m_XX; float m_SLP; Key(float XX,float SLP):m_XX(XX),m_SLP(SLP){} Key(const Key& key):m_XX(key.m_XX),m_SLP(key.m_SLP){} }; struct keyComp { bool operator() (const Key& lhs, const Key& rhs) const { if(lhs.m_XX < rhs.m_XX) return true; else return lhs.m_SLP < rhs.m_SLP; } }; class K{ public: int m_IND; int m_DIR; float m_XC; float …

Member Avatar for programmersbook
0
129
Member Avatar for DawnOfIkaros

Don't know if this is the right place to post this but... I just started with SDL, and get the error: expected constructor, destructor, or type conversion before '*' token With this code: [CODE]#pragma comment(lib, "SDL.lib") #pragma comment(lib, "SDLmain.lib") #include "C:\Documents and Settings\Mikael\Mina dokument\SDL\SDL-1.2.14\include\SDL\SDL.h" #include <cstdlib> #include <iostream> #include <string> …

Member Avatar for DawnOfIkaros
0
113
Member Avatar for zobadof

[code] #include <iostream> #include <iomanip> { void DispalyStoreItems (); int ChoosingItems (); double calculateChange ( int , int ); { int cost; DispalyStoreItems (); cost = ChoosingItems (); calculateChange ( int pay , int cost ); system ("PAUSE"); return 0; void DispalyStoreItems () { std::cout <<"Code" << setw (10) << …

Member Avatar for Nick Evan
0
2K
Member Avatar for zobadof

[code] #include <iostream> #include <iomanip> { void DispalyStoreItems (); int ChoosingItems (); double calculateChange ( int , int ); { int cost; DispalyStoreItems (); cost = ChoosingItems (); calculateChange ( int pay , int cost ); system ("PAUSE"); return 0; void DispalyStoreItems () { std::cout <<"Code" << setw (10) << …

Member Avatar for Nick Evan
-1
163
Member Avatar for dardar4

i got a project that uses TooN and cvd libaries. i got the TooN and cvd source and headers files (downloaded from their sites) but i dont know how to add them to my project. i think i should make lib files and than add them to the project, but …

Member Avatar for hichnam
0
114
Member Avatar for C++ Beginner

The program calls for: Here is what the program calls for: Write a program that lets a maker of chips and salsa keep track of their sales for 5 different types of salsa they produce: mild, medium, sweet, hot, and zesty. It should use two parallel 5-element arrays: an array …

Member Avatar for valtikz
0
441
Member Avatar for UberJoker

Any ideas on how would I be able to traverse this BTree in asceding order? right now I am sorting the data and giving it to my retreival() function to look for the keys. But naturally it visits and prints the data in ascending order because I give it sorted …

Member Avatar for wmsigler
0
229
Member Avatar for mohammad1982

Hi, I am new to Dev C++ (and C programming iteself!). I was trying to write a project in Dev C++ and I faced two problems. I will really appreciate it if anyone can help: 1- I created a project and added one main file to it. There are some …

Member Avatar for Frederick2
0
110
Member Avatar for codysundermann

I CAN NOT GET THIS TO WORK I THINK IT IS GOING WRONG IN THE INDATE FILES [code] #include <iostream> #include <fstream> #include <string> #include <iomanip> #include <cstdlib> using namespace std; void calculateAverage (ifstream&, ofstream&, double&); char calculateGrade (double); int main () { char grades [15]; double avg, average=0; int …

Member Avatar for Ancient Dragon
0
81
Member Avatar for nestafary

I need help deleting movie title from a data file. I did the code. And ido many of the task. I can make it delete. a particular movie title. Now the code just delete everything on the file.

Member Avatar for Ancient Dragon
0
32
Member Avatar for Snapster5

Ok so this is an extra credit lab i have for any missed lab or replace for our lowest lab score for anyone has in the class. I'm not sure what im suppose to do with it the teacher just emailed us this info. If anyone can direct me to …

Member Avatar for Dave Sinkula
0
119
Member Avatar for PDB1982

I'm trying to take some information from a file and input it into an array so that it can be output on the screen, but I can't get this to work. Here's the kicker though....the file has to allow 100 test scores, but must end when it hits -999....any ideas? …

Member Avatar for Dave Sinkula
0
94
Member Avatar for Tonka_view

Hello, I'm quite new to the world of C++ programming I just started to like and learn the language a year back. I have a problem which is related to sorting. Let's say I wanted to sort multiple array containers containing related elements. For example: [ICODE] Array1 Array2 Array3 Name …

Member Avatar for Tonka_view
0
924
Member Avatar for cole davidson

Hey guys, So I need to write a program that will prompt the user to enter the name of a .txt file, then count the occurence of each letter. It should print out the results on the screen and ask the user to enter a .txt file name to store …

Member Avatar for cole davidson
0
119
Member Avatar for confusedndazed

I'm trying to design a program that will input ages of 50 active duty Navy personnel and then finds the average age of current active duty Navy members. Here is my current pseudocode, could anyone tell me if there are errors? [code=text] Declare age[50] as integer Declare Sum, Average as …

Member Avatar for mrnutty
0
124
Member Avatar for Mexkn

I am trying to make a division and with the answer I want to separate the decimal and round it to two decimal points. After this, I want to assign the decimal part to another function. Thank You

Member Avatar for mariorenato
0
231
Member Avatar for *Moonlight*

[B]Hi, I need urgent help on my assignment...please don't assume I'm asking you to write my program..I just need a guide to start. I've lost my USB so I lost all my programs, and all the notes etc from class and I've been sick lately so haven't been attending class …

Member Avatar for *Moonlight*
0
878
Member Avatar for winson.thai

I am having major trouble with a fraction program. i spend hours fixing the errors and it still does not work. this link provides the instructions: [url]http://web.jjay.cuny.edu/~sbakiras/mat272/assignment3.pdf[/url] this is my code:[CODE] #ifndef RationalNumbers_H #define RationaNumbers_H class RationalNumbers { private: double numerator; double denominator; public: RationalNumbers(); RationalNumbers operator+(const RationalNumbers &); RationalNumbers …

Member Avatar for Agni
-1
380
Member Avatar for redwolf99

For my final project in COSC I, I am supposed to make a semi-poker simulation. Right now I am having trouble determining when the given hand is a fullHouse. Here is the whole program so far. [CODE] #include <ctime> // time for random number seed #include <iostream> #include <cstdlib> // …

Member Avatar for redwolf99
0
2K

The End.