49,766 Topics
![]() | |
im trying to show what is stored in arrays, basically to make sure my program is working fine, i have got it to print which element in the array it is, but how do u access the array and show what value is stored in it. my code is basically … | |
Hi, I am on Windows xp professional edition and looking for a free develeopment tool/ide for some self c++ learning. The one I can across is Dev-C++ 5 (currently beta) from [URL]http://www.bloodshed.net/devcpp.html[/URL] It is supported on XP but it is still beta version and I want something stable. Can any … | |
the program i have to write involves a dynamically linked stack to evaluate if the grouping symbols '[B]([/B]' , '[B])[/B]' , '[B]{[/B]' , '[B]}[/B]' , '[B][[/B]' , '[B]][/B]' in expressions are balanced. The expression is input through keyboard. For example: expression: {A+(B-C)*D} is balanced expression: T+{(R+M)/G-V*L is not balanced expression: … | |
So basically, my assignment was to write quick sort and merge sort using both vectors and arrays, and time how long it takes to sort the the arrays and vectors of various sizes. However, the code is producing inconsistent results. Sometimes it seg faults, other times it produces unfriendly messages … | |
[CODE][/CODE] average=a[counter]+b[counter]+c[counter]+d[counter]/12; can someone can help me? modify to modify this code using an for loop? thanks | |
I have developed a program in an XP enviroment using Borland Builder 6. It has since been installed on a computer with Vista. The program opens text files which are stored in the root directory of the program. The pathname is set in global constants like "name.txt". This works fine … | |
hi, I have used LoadImage() to load a bitmap as HBITMAP. If I use SelectObject() to attach it to an HDC, and then BitBlt() it to the screen, that works fine. I need an array that would be compatible with the one produced by CreateDIBSection(). I have tried GetBitmapBits(), and … | |
The idea of the entire program is to play a simplified version of war that's why its 28 cards. Anyway my problem comes from the dealRandomCard function when I compile it it says there needs to be another ) before time. I'm not sure what to do. I appreciate the … | |
the programe output the sum of the factor of a number entered by user and when he enter 0 the programe should display output with no result for 0 here is the code #include<iostream> #include<iomanip> using namespace std; int main() { int x,i; int z=1; int sum=0; while(cin>>x) { if(x!=0) … | |
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> … | |
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. | |
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. … | |
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- | |
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 … | |
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 | |
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++) { … | |
I want to do coding on C++ using arrays for the numbers 20,-10,50,4,10,2,6 in ascending order..... | |
[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< … | |
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 … | |
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 … | |
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 … | |
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' … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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: … |
The End.