49,761 Topics
| |
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: … | |
[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 … | |
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 … | |
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* … | |
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 … | |
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 … |
The End.