49,756 Topics

Member Avatar for
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
75
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
159
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
92
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
111
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
154
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
67
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
143
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
190
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
120
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
86
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
230
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
116
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
Member Avatar for peter brown

One large chemical company pays its salespeople on a commision basis. The sales people receive $200 per week plus 9 percent of their gross sales for the week. For example a sells person who sells $5000 worth of chemicals in a week receive $200 plus 9 percent of $5000, or …

Member Avatar for ~s.o.s~
2
1K
Member Avatar for gampalu

Does anyone know where to download the library from LAPACk to run under C++?

Member Avatar for ~s.o.s~
0
77
Member Avatar for confused!

Hello! I am a student taking an intro to programming class and I am completely LOST. The assignment is to write a program that simulates an adding machine. I have been working on this for 3 hours and so far I have only been able to get the first line …

Member Avatar for ~s.o.s~
0
279
Member Avatar for jack19

hi jack here,i want to which are the best websites who could offer me clear and total info and tutorials on c++ and c programming..

Member Avatar for happygeek
0
95
Member Avatar for balekic

Hello all, I am a noob to C++ and would appreciate any help that I can get. I am taking a beginner's course and got this assignment: I have to take a users input (i.e. a sentence) and capitalize the first letter of the sentence and make sure each letter …

Member Avatar for balekic
0
81

The End.