49,761 Topics
| |
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. … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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] | |
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; } … | |
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 … | |
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 … | |
[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 … | |
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: | |
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 … | |
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.:) | |
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 … | |
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 | |
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') { … | |
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 … | |
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 … | |
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 … | |
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){ … | |
:?: 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 … | |
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? | |
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. … | |
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. | |
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 … | |
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 :) | |
| 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. |
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 … | |
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 … |
The End.