49,766 Topics

Member Avatar for
Member Avatar for straight_rydr

I need the user to input a book title then price, once that is done when the user searches for the book it displays the title and price that the user has made. Right now its showing weird numbers when displaying the price for book. [CODE]#include<iostream> #include <iomanip> using namespace …

Member Avatar for Crak
0
129
Member Avatar for Leppie

Trying to create 20 files using ofstream. I could name each individual file on creation, file01.txt, file02.txt ect but wondered if it was possible to use a string variable in place of say the file name (file01.txt) and then use a loop to create the other files. Does the name …

Member Avatar for Leppie
0
2K
Member Avatar for blumarker

Hello, I'm having trouble with buttons with Visual Styles enabled on a black background color. Like so: [url]http://i48.tinypic.com/28lf6zn.png[/url] On an effort to fix this I attributed WS_EX_TRANSPARENT style to the buttons, which only made these bits of white border-like aspects appear occasionally(they show up at random times and for random …

0
19
Member Avatar for genux

hi all, I kinder got bored with software development for a bit and was not until I noticed CS106A(Java based) and the CS106B (C++) which has really re-light my developer bug as such.. was wondering what other courses can people recommend to keep that bug keep on going ?

Member Avatar for genux
0
72
Member Avatar for LevyDee

Hi, I'm trying to iterate through an stl list object list(customer being my struct that holds the name, age and gender variables[customerList being my list]), but I'm getting an error. [code] void store::listCustomers() { vector<customer>::iterator it; for(it = customerList.begin(); it != customerList.end(); it++) { cout << it->name << endl; cout …

0
57
Member Avatar for JaimeSharp

Now I HAve Written The following Programs [CODE] # include <iostream> # include <string> # define MAXSIZE = 300 using namespace std; bool findTitlePrice(string allTitles[300], double allPrices [300],int totalRec,string title,double price); string allTitles[300] = { "Book 1", "Book 2"}; double allPrices[300] = { 78.5, 66. }; int main () { …

Member Avatar for JaimeSharp
0
261
Member Avatar for bigcheesy

Hello, I am having some trouble figuring out an assignment I was given in class. I am not looking for any code, but need a better explanation that what the teacher has given. Basically the program will calculate the number of days between any two days from 1/1/1900 through 12/31/2099, …

Member Avatar for JeyHey
0
7K
Member Avatar for aryansmit3754

could somebody tell wats wrong with this #define FOR(x,n)for(typeof(x);x<n;x++)

Member Avatar for mrnutty
0
192
Member Avatar for abhi74k

[CODE=c++] class A { int num; public: A() {} A(int _num) : num(_num) {} A operator + (const A & ob) { return (num+ ob.num); } }; int main() { A ob1(1); A ob2(2); A ob3(3); A ob4=ob1+ob2+ob3; } My doubt is in ob1+ob2+ob3 . First ob1+ob2 is evaluated and …

Member Avatar for Aranarth
0
149
Member Avatar for new2programming

I am making a jump and run game- i want my sprites to collect items that are worth points. I want these items to be randomly generated on my tile map. Does anyone know how i can do this? I am using Visual C++ with SDL

Member Avatar for Aranarth
0
93
Member Avatar for kalrajhi

Hey guys, I am having a problem with this program. It's actually part of an example from Michael Dawson's [I]Beginning c++ Game Programming[/I] This program pretty much randomized a number between 1 and 100 and has the user input his/her guess. The user can deduce what the number is each …

Member Avatar for kalrajhi
0
253
Member Avatar for iamcreasy

I am new new in OOP stuff.I have read the Herbert Schildt's C++ reference.But it just gave me the idea, about how it work.Not how to make it work. I am read few chapters from "Object-Oriented Programming in C++ by Robert Lafore"(old edition featuring UML 1, i guess).But it was …

Member Avatar for avarionist
0
170
Member Avatar for Excizted

Hello, I have a derived class, that I'm trying to delete. This causes a segmentation error, though. I'm fully aware of the virtual destructor thang, but I'm using it all the way around, and still this issue occurs. I'll post my headers only, please tell if more is required. DataStream.h …

Member Avatar for Excizted
0
3K
Member Avatar for vilas_tadoori

Hi All, I have written reversible link list and pasting the code as below in c++. It works fine, please let me know if there are anything more that is required to make this more robust. This is on a single link list. [CODE] [COLOR="Green"] #include "stdafx.h" #include <iostream> using …

Member Avatar for vilas_tadoori
0
154
Member Avatar for Babatuda

Hello I am having some problem, can any body give me a helping hand each time I compile I get this error massage, I dont know where I made the mistake help please I new to programming[code]This is my Main File include libraries #include <iostream> //Call C++ normal imput and …

Member Avatar for avarionist
0
451
Member Avatar for r1409

hi all i have an assignment in which i have to use object-oriented programming to read from an input file(say: input.txt), use prim's algorithm and calculate the weight of a minimun spanning tree and then save the output to a file(output.txt). the problem with my code is that the program …

Member Avatar for daviddoria
0
638
Member Avatar for Jennifer84

Hello I am trying to compile my project in VC++ Express Edition and get the error below. The project did compile fine before I reinstalled XP windows. But now when I have installed everything again, I receive this error. I dont understand what this can mean ? When clicking the …

Member Avatar for Jennifer84
0
284
Member Avatar for rootchord

Been working on this for hours now. but most of it has been trying to fix these two errors. I've been googling my heart out and keep getting cryptic answers about the [B]const[/B]. Really need help. it's supposed to take in names of students and their scores, sort them, then …

Member Avatar for rootchord
0
639
Member Avatar for leesho

i have this code which input 3 numbers into ascending order. i know make it 10 i just change the array size but then it is only ascending the numbers that were inputing that are under 10. how can i change it so it's any number. [code]#include <iostream> #include <conio.h> …

Member Avatar for mrnutty
0
271
Member Avatar for tonymuilenburg

Hi All, I'm trying to figure out how to load images from a resource file into a picture box using a visual studio windows forms application in c++. I figured out two different ways to do this in c# by going through the forums, but I cannot figure it out …

Member Avatar for tonymuilenburg
0
1K
Member Avatar for tundra010

Hello everyone I know that one cannot pass a parameter to destructor functions in classes. Is there a reason why this functionality was left out of c++, and is there a way to get around it? Thanks!

Member Avatar for tundra010
0
107
Member Avatar for erka4444

I am trying to write a function which converts a number to a string. But when I return from the function, the reviving string - according to debug mode - still is empty, so the program outputs nothing. What am I doing wrong? [CODE=c] #include <iostream> #include <string> using namespace …

Member Avatar for amrith92
0
99
Member Avatar for tomtetlaw

Say I have an array like this: double *a; and I use new/delete[] to do memory allocation on it. How would I be able to delete certain elements from it? Like this: [code=c++] void RemoveElement(double *a, const double &element) { } [/code]

Member Avatar for tomtetlaw
0
96
Member Avatar for zyky

Hello, I'm writing a simple program implementing a list. You can add, remove, search, print and find the minimum element. My problem is that the program crashes if I don't add the 'system("PAUSE");' line before the last 'printf("Minimo = %d.\n", minimo(l));' call in the main method. Here is the code: …

Member Avatar for zyky
0
196
Member Avatar for Curt1337

Hi there everybody, I am currently studying for my university exams and need 2 make a function for the below scenario. The function must display the information inside the 2D array as you can see in my code I have tried but to no prevail. Any help will be GREATLY …

Member Avatar for Curt1337
0
319
Member Avatar for JaimeSharp

I am in a bit of trouble with this code it is due tomorrow need pointers the menu is displaying correctly but when i enter a number it locks up have i declared the switch statement wrong or is my menu declared incorrectly also in regards to case 4 it …

Member Avatar for JaimeSharp
0
123
Member Avatar for leesho

i have this code here which inputs the numbers and then adds them. is there a cheats way i can change it so that it inputs the numbers then puts them into ascending order. [CODE]#include <iostream.h> void getNumber(int &, int); void sum( int, int &); void output(int[ ], int, int); …

Member Avatar for s_sridhar
0
106
Member Avatar for yongj

I have NEVER had this experience before while coding my past assignments. For some reason, I keep getting this error that says [CODE]error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup[/CODE]. I looked it up on google and people have been saying it's because I should've created a windows …

Member Avatar for yongj
0
96
Member Avatar for new2programming

I am wanting to add the most simpelist count down timer available for Visual C++ with SDL. Does any one know of a good one i could try and use

Member Avatar for Ancient Dragon
0
65
Member Avatar for leesho

[CODE]#include<iostream.h> #include<iomanip.h> using namespace std; float number1, number2, number3; void readThreeNumbers(number1, number2, number3); void sortThreeNumbers(number1, number2, number3); void displayNumbers(number1, number2, number3); int main () { readThreeNumbers(number1, number2, number3); sortThreeNumbers(number1, number2, number3); displayNumbers(number1, number2, number3); } void readThreeNumbers(number1, number2, number3) { cout << "Please enter three floating-point numbers, space between them: …

Member Avatar for leesho
0
182

The End.