49,757 Topics

Member Avatar for
Member Avatar for ItecKid

Hello, I am trying to write the quick sort algorithm to take in an array of 20 random integers and sort them. However, it is producing weird output for the sorted list. My code is as follows, can anyone give me a little help here? [code=C++] #include <iostream> #include <vector> …

Member Avatar for Freaky_Chris
0
106
Member Avatar for Lukezzz

How will it be possible to add "Gray" lines in a Menu (MenuStrip). I have attached a picture of how I meen. Example WordPad in Windows uses these type of menus to separate MenuChoises.

Member Avatar for Lukezzz
0
128
Member Avatar for tobeornottobe

Hello Have built a test "win32 console application" that uses a dll to interface with a piece of hardware I have. This compiles fine. I've been trying to build the same project but this time as a windows form project so I can have a proper interface for my program. …

0
40
Member Avatar for noobDriverDev

how can i develop a simple minifilter driver that will specify a drive/directory (as input) from user-mode, for example "Z:\", and communicates with the kernel-mode and then display all the files/folders exists in the user-mode. please i need a shoulder on this.. =( and thanks in advance.. -noobDriverDev-

Member Avatar for n30h
0
95
Member Avatar for jonevans2

Ok so I'm having some problems with this program I have to write as you might be able to tell it takes strings from the user either in english or morse and translates them to morse or english respectively. I got it working from English -> Morse for strings with …

Member Avatar for MosaicFuneral
1
146
Member Avatar for asifjavaid

Hi, I am new to COM Programming. I want to initialize COM library. I am calling hr = CoInitializeEX(NULL); but hr = S_FAIL. and my code is stopped. What I have to do further to execute COM program written in VC++.NET 2005. -- Regards, Asif

Member Avatar for Laiq Ahmed
0
196
Member Avatar for FrancisC07

oopss i still have a problem!!.. What's wrong with my code? [code=cplusplus] main() { int a[4]; int b[4]; int counter,sum=0; cout<<"JANUARY"; for(counter=0;counter<4;counter++) { cout<<"Numbers of Rainfall:"; cin>>a[counter]; } for(counter=0;counter<4;counter++) { sum+=a[counter]; } cout<<"The numbers of rainfall in the first month"<<sum<<endl; cout<<FEBRUARY; for(counter=0;counter<4;counter++) { cout<<"Numbers of Rainfall"; cin>>b[counter]; } for(counter=0;counter<4;counter++) { …

Member Avatar for MosaicFuneral
0
110
Member Avatar for C++.java

I want to do coding on C++ using arrays for the numbers 20,-10,50,4,10,2,6 in ascending order.....

Member Avatar for Salem
-1
129
Member Avatar for bradbobak

[code] #include <iostream> class base { public: void print() { std::cout << "base" << std::endl; } }; template< class B > class der : public B { int i; public: virtual void print() { std::cout << (B *)this << std::endl; B::print(); } }; int main(int, char **) { der< der< …

Member Avatar for bradbobak
0
243
Member Avatar for Seamus McCarthy

Hey can anyone offer me any advice on updating my customer file, I created the blank records and can create a record in the newCustomer function but can’t seem to access that record again for updating, does anyone know where I’m gone wrong. Any help would be greatly appreciated. [CODE]fstream …

Member Avatar for ku.bis
0
164
Member Avatar for 666kennedy

basically here is my code, sorry if its untidy. you will see in the crossover function i want to use the rand. i get errors like "too many arguments for int rand()" [CODE] #include <iostream.h> #include <conio.h> #include <iomanip.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <ctime> #include <cstdlib> #pragma …

Member Avatar for ArkM
0
153
Member Avatar for FrancisC07

i need a help on how to add the value of an array to another value of an array? i dont need the whole program.. i just want to know what will i do in order to add the 4 values of an array using the for loop statement. for …

Member Avatar for FrancisC07
0
188
Member Avatar for meistrizy

Hello. Thanks in advance for helping a newbie. I am supposed to add a bottom loop (which I assume is a do while) that asks the user if he/she wishes to compute another series and as long as the answer is 'Y' or 'y' to iterate the loop until 'n' …

Member Avatar for meistrizy
0
56
Member Avatar for roidel

Hi, i found this code from an article, i want to compile this code, buat I don't have file polygon.h. Can you send file polygon.h to me, because i have search from any web buat i don't find it. This the code [code=c] #include<stdio.h> #include<conio.h> #include<windows.h> #include<math.h> #include<stdlib.h> #include<GL/glut.h> #define …

Member Avatar for jencas
0
174
Member Avatar for gm999

Hi guys, I'm quite new to C++ and I'm having problems with a simple operation. I have to resize an array of structs, but seeing as I am having a problem with the concept, i'll post an example with a simple array of integers. Please bear in mind that this …

Member Avatar for gm999
0
84
Member Avatar for samishunk

A Book shop maintains the inventory of books that are being sold at the shop. The list includes details such as author , title , price , publisher and stock position. Whenever a customer wants a book , the sales person inputs the title and author and the system searches …

Member Avatar for samishunk
0
185
Member Avatar for lmastex

Hi. I want my Insertion method in my link list class not to insert repeated elements. I have tried several ways but I have seriously ugly bugs in my code: [code=cplusplus] template <typename ListElement> void List <ListElement>::Insert() { NodePtr Ptr; Ptr = new Node; bool repeated = true; if (Ptr …

Member Avatar for Laiq Ahmed
0
172
Member Avatar for karang

Hi I have a virtual function setStartupDirectory() virtual bool setStartupDirectory(const SysString &sStartupDirectory) = 0; When I am calling this function setStartupDirectory((const SysString &)m_pApplicationFolderNarrow); I am getting this error Error 2 error C2664: 'setStartupDirectory' : cannot convert parameter 1 from 'const SysString' to 'const SysString &' Am I missing something

Member Avatar for sweeya
0
126
Member Avatar for chchiu

How to write a program that output the number of different ways of arranging the number so that the displayed numbers add up to a fixed sum inputed byt the used. For example, suppose the sum is 4. There are 8 different arrangements. It has to be listed in dictionary …

Member Avatar for ithelp
0
36
Member Avatar for ACRobison02

I have to create a program with parallele arrays that recieves information from a file telling it how many salsas their are (their can't be more than 10). One array containts the name of the salsa, the other array contains the number of salsa jars sold. Then I have to …

Member Avatar for cikara21
0
101
Member Avatar for Jwhispers

I had to write a program to add two angles together. I've got the meat done, but i'm having a hard time figuring out how to code the program when i add the angles together so that when say Seconds is more than 60 it adds 1 to minutes. example: …

Member Avatar for Jwhispers
0
259
Member Avatar for piznut25

[CODE]/* Filename: odometer.cpp * Author: Tom Pizzo * Email address: pizzotm@clarkson.edu * Description: Program to track fuel and mileage for an automotive vehicle. * Last changed: Dec 1, 2008 */ #include <iostream> using namespace std; const char YES = 'y'; class Odometer { public: Odometer (); //Constructor function to initialize …

Member Avatar for cikara21
0
134
Member Avatar for kitty7

Hello, I am a new programmer attempting to tackle this puzzle after a couple of setbacks. I was excited about this project, but I am very stuck, and I am not sure where to go, or even if I'm on the right track. Okay, so let's get down to the …

Member Avatar for kitty7
0
129
Member Avatar for namehere05

Ah right! Im on my first steps on c++, What Im trying to do is have this "basic node" class wich just take an id and from there usign inheritance make "linked list node" and "binary tree node" classes my code so far looks like this [CODE]void main() { sLink* …

Member Avatar for namehere05
0
109
Member Avatar for acperson

I've been trying to fix these errors for a while now and I'm having difficulty. Can anyone help? I've attached my header file, .cpp file and main. The C2533 and C2511 are both in my .cpp file. c:\documents and settings\tina\my documents\visual studio 2008\projects\csci112lab4\csci112lab4\invoice.cpp(15) : error C2533: 'Invoice::{ctor}' : constructors not …

Member Avatar for acperson
0
453
Member Avatar for Bleek

hey... im in a c++ class at school but i also program at home. my teacher refuses to teach me graphics and i wanted to know if there was an easy way to just basically cout a graphic. if this is noobish and i need to learn a lot more …

Member Avatar for Manutebecker
0
363
Member Avatar for anbuninja

Im having a hard time where to start with this assignment. Obviously I did the easy part now its time for the loop which i just dont get. heres how the program will run [B]Enter the initial balance ===> 1000 Enter the number of months to cover: ===> 3 Enter …

Member Avatar for Lerner
0
112
Member Avatar for Awebb999

I just learned about bubble sort and still don't know how to make it work in my program I hope someone can help me. This is my task I should use parallel arrays (of size 20) for student name, student number, test score, and letter grade. The list must be …

Member Avatar for Awebb999
0
150
Member Avatar for FTProtocol

ok so im trying to find a certain string in a txt file and once its found it needs to skip that line, the next line then add the following 2 lines into their own buffers. EG: Example ofomgwtfcantfindit kthx Woot Bang asdasd 'asdasd asdasd so it finds the string …

Member Avatar for Ancient Dragon
0
179
Member Avatar for ojung

The End.