49,761 Topics

Member Avatar for
Member Avatar for aznballerlee

I just got my C++ assignment today, and I don't understand it. Here are the instructions. The topic is on DDR (Dance Dance Revolution) [B]Your task[/B] For this project, you will implement the following two functions, using the exact function names, parameters types, and return types shown in this specification. …

Member Avatar for Ancient Dragon
0
69
Member Avatar for ReDeViL

Write a program that accepts a number and produces a pattern as shown in the following sample outputs. Line = 3 *.* .* * Line = 8 .*.*.*.* *.*.*.* .*.*.* *.*.* .*.* *.* .* i've just learnt to use the setw() command..... but how do you fill up the alternate …

Member Avatar for ReDeViL
0
135
Member Avatar for taruj83

hi, i need to write a c++ program that takes input of a expression like say y = 5 + 2b; and gives out the output y = 5 + 2b it uses linked lists and the expression can be composed of integers, variables and operators. the encoding of tokens …

Member Avatar for iamthwee
0
97
Member Avatar for nono909

Hello, i'm trying to write in the main program a linked list of namesfractions, and integres. i don't know if anyone can help me in this. i attached the fraction class and the implementationUsing the linked list class we derived in class, and the following functionality:[LIST] [*]A print function (you …

Member Avatar for iamthwee
0
85
Member Avatar for Eadams20

[code] #include <cmath> #include <iostream> using namespace std; //Function prototypes void getPrice (float&); void getInterestRate (float&, float&, float&); void getDownPayment ( float&); void gettradeIn (float&); void calcmonPayment (float, float, float, float, float, float&); int main() { // Input variables float price; float downPayment; float tradeIn; float loanAmt; float annualIntRate; float …

Member Avatar for Nick Evan
0
101
Member Avatar for easy

im just doing a little exercise on the bubble sort algorithim, i included two ways of incresing its speed. 1. Breaking out of the loop if no swaps are made 2. Decreasing the inner loops lenght each pass I think there is two ways of doing it. This way i …

Member Avatar for WaltP
0
84
Member Avatar for disc

Hello, Can anyone tell me what the code beneath means. I've searched but can't find a clear explanation. Maybe someone can give an example of how to use it. Thanks... [code] [COLOR=#0000ff]bool[/COLOR][COLOR=#000000] MyClass::[/COLOR][COLOR=#0000ff]operator[/COLOR][COLOR=#000000]()()[/COLOR] [COLOR=#000000]{ [/COLOR] [COLOR=#000000] ....[/COLOR] [COLOR=#000000]}[/COLOR] [COLOR=#000000]class MyClass[/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=#0000ff]virtual[/COLOR] [COLOR=#0000ff]bool[/COLOR] [COLOR=#0000ff]operator[/COLOR]()(); } [/code]

Member Avatar for disc
0
161
Member Avatar for taruj83

dont know what is wrong with this, wont give me the result. please help [code]#include <iostream.h> #include<stdlib.h> #include <process.h> #include <conio.h> class SortList { private : int *list; int size; public : SortList(int size) { list=new int[size]; this->size=size; } void Swap(int i,int j) { int tmp; tmp=list[i]; list[i]=list[j]; list[j]=tmp; } …

Member Avatar for WolfPack
0
106
Member Avatar for GarveyDesign

I've just bought a copy of Borland C++ V.6 personal, for the purposes of compiling/'single stepping' my C code for college work. When I click the right pointing green arrow, the code compiles, (HelloWorld!) but trying to single step through the code or get an executable isn't obvious. Trying to …

Member Avatar for GarveyDesign
0
93
Member Avatar for rgbivens

Hi guys, I just found this site while doing a google search for "declaration syntax errors" and it looks like there are some great people here that are willing to take time to explain things which is what I need! I'm in college taking c++ and my teacher doesn't tell …

Member Avatar for WolfPack
0
220
Member Avatar for AnG'

[COLOR=#555555]Greetings C++ Lovers:[/COLOR] [COLOR=#555555]I'm a student very new to this C++. Yes I took Linux & UNIX. That was a year ago and I've never applied it to ANYTHING. If it's not too much trouble, I'm at a loss. A Big LOSS. You see, the reason I say this is …

Member Avatar for AnG'
0
120
Member Avatar for doraemon

I recently learned the command-line argument from my book, and I understand that both of argc and argv. HOWEVER, I don't know when I will use them and for what purpose??? I appreciate if anybody can help me!!:sad:

Member Avatar for doraemon
0
213
Member Avatar for jhdobbins

As far as i thought, this should work?? there is a spot or 2 i am concerned if i did it right though. Any ideas would be nice. It fatally crashes when ran in windows, didnt try in linux due to the fact i know it wouldnt work there either …

Member Avatar for ~s.o.s~
0
155
Member Avatar for khem Nath

a)how to run c++ program on Borland c package.I am preparing a graphic program on c++ but my progrm shows it can't run on windows. b)how a pointer is un limited array.:)

Member Avatar for Ancient Dragon
0
68
Member Avatar for stupidenator

Hello everyone, I am working on an assignment which has me build a huffman tree. I am fairly confident that I have built my huffman tree correctly, but now I must get the Huffman code for the characters being encoded (I need to get the 1's and 0's). I am …

Member Avatar for iamthwee
0
1K
Member Avatar for boule

Hi guys, I need to find the size of the activation record of a procedure using the "address of" (&) operator... Any idea how it's done ?? Thanks for your help Boule

Member Avatar for Salem
0
152
Member Avatar for nick937

I wrote two programs, this one: [code] #include<iostream> using namespace std; main() { char rom,invalid; double tot; tot=0; cout<<"Please enter Roman numerals ending with a period."<<endl; while (rom != '.') { cin.get(rom); if(rom=='M' || rom=='m') { tot=tot+1000; } else if(rom=='D' || rom=='D') { tot=tot+500; } else if(rom=='C' || rom=='C') { …

Member Avatar for ~s.o.s~
0
104
Member Avatar for rhhaney145

Please Help, I am trying to create a visualizer for STEP (standard for exchange of product model data) files using C++ and OpenGL on Windows XP platform. I can get the OpenGL to draw some simple lines/shapes, the problem seems to be with parsing/understanding the file protocol. Has anybody out …

0
82
Member Avatar for Mangai

Hi, I am Mangai, I am working in VC++. When I run my code I get an error like error C2143: syntax error : missing ';' before '*' error C2501: missing storage-class or type specifiers since I am a beginner I couldnt fix it. Can anyone help me in fixing …

Member Avatar for Mangai
0
219
Member Avatar for matrimforever

How do I call a function outside of main or use a parameter to pass a reference? If my function is: [code] void getData(int& diameter, int& price) { cout << "Enter in the diameter of the pizza in: " << endl; cin >> diameter; cout << "Enter in the the …

Member Avatar for matrimforever
0
125
Member Avatar for venomlash

I use Bloodshed Dev-C++ version 4.9.9.2 and it is a little weird in that it accepts "and" as "&&" and "or" as "||", not to mention not requiring parentheses around separate clauses in and/or connected statements. Therefore it would read the following as the same. if(voice==loud or voice==annoying and voice==whiny){ …

Member Avatar for vegaseat
0
199
Member Avatar for nimmi

:?: converting binary numbers entered by the user to their equivalent decimal,program will have one function that takes an integer(1 and 0) upto 10 digits in length.Means binary into decimal ,I dont know where iam doing mistake, and my out put if i entered binary no 111 or any bin …

Member Avatar for Infarction
0
121
Member Avatar for FireSBurnsmuP

I'm trying to write a destructor function for my class type message, but I can't get the dang thing to [inlinecode]delete[/inlinecode] strings. So, uhm, Help! Do I have to go through a for loop and delete each character individually?

Member Avatar for ~s.o.s~
0
112
Member Avatar for matrimforever

Hi, I need to write a n00b program that calculates the best deal customers can get when buying pizza. The premise is, although an extra large pizza may appear a better buy, you need to calculate the cost per sq inch of both round and rectangular pizzas to really know. …

Member Avatar for ~s.o.s~
0
2K
Member Avatar for nasduck

I am a beginner on C++, and I have 3 programs at hand, who can show me how to write the prgrams for those problems, thank you very much:lol: : See the attached file.

Member Avatar for iamthwee
0
87
Member Avatar for The Tao Of Bill

You guys have got to be sick of these C++ noobs coming in here asking for homework help but thats what Im going to have to do because I am totally lost....I was following pretty good till we got to overloading and passing things polymorphicly Anyway the point of this …

Member Avatar for iamthwee
0
231
Member Avatar for Latifa

Hi, I need help with my homework please, its due tommorow and i prommise to show my efforts in the next days :sad: [url]http://www2.filehost.to/files/2006-10-16_03/214316_cplus.jpg[/url] Thanks in advance :)

Member Avatar for jdarvwill
0
125
Member Avatar for GreenDay2001

Suppose I have created a class [B]new [/B]with arguments.I have declared this as object [B]new1[/B] in the main. [I]new new1(arguments)[/I]. Now what should i do if i want to change the values of [I]new1 [/I]object's arguments.

Member Avatar for GreenDay2001
0
87
Member Avatar for blairwitch

I would require a visualisation to respond to the music being played on the media player as well as the microphone input simultaneously using media player SDK and c++. In other words, the visualisation would need some way of differentiating between the sound coming from the microphone and the sound …

Member Avatar for Salem
0
71
Member Avatar for lavicool

Hi all, I just joined the post. Iam new to C programming. I have a question regarding a problem i found in some book. The problem is i have a input file with student ID, 5 program scores, midterm and final score. i have to check for wrong input of …

Member Avatar for lavicool
0
120

The End.