49,761 Topics
| |
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" << … | |
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 … | |
Why turbo C++ compiler is not supporting in laptop(compaq CQ40,lanova 450) ????...........Is there any other compiler that support for laptops?????????? | |
[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 << … | |
Hello I would like to start learning allegro but need some suggested sites, please help! | |
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 … | |
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; … | |
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 … | |
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; … | |
How to code for a 3D rectangle and how to scale or translate in visual C++ ?please someone help... | |
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 … | |
[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 … | |
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> … | |
[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) << … | |
[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) << … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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? … | |
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 … | |
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 … | |
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 … | |
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 | |
[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 … | |
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 … | |
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> // … |
The End.