49,766 Topics

Member Avatar for
Member Avatar for FEC

Hi am trying to write a program and its giving me this error "cannot instantiate abstract class", can someone help me please? this is the code: Header: [CODE]#ifndef ABSTRACTGEOMETRICOBJECT_H #define ABSTRACTGEOMETRICOBJECT_H #include <string> using namespace std; class GeometricObject { public: GeometricObject(); GeometricObject(string color, bool filled); public: string getColor(); void setColor(string …

Member Avatar for Kanoisa
-1
380
Member Avatar for ultrAslan

I need to write a code to be able to interpret the input date to calendar system. First input is the date and second input is the first day of the year. I dont know how to start. I hope someone could help me. Thanks 12/10/2011 S Output: October, 2011 …

Member Avatar for bbman
0
177
Member Avatar for Vasthor

Ok, here I come with a some sort of big analysis with pointer, array, vector, iterator and address of memory... using this input: [CODE] // hakim makan nasi // ayam yang basi // sambil tengok // hafiz yang tergelak // gelak [/CODE] with this code: [CODE] #include <cstring> #include <iostream> …

Member Avatar for Narue
0
222
Member Avatar for doma18

C++ emergency need this word doc to be done and i can't do it my self cause it bit to hard for me plz help Write a program to survey people, that will generate statistics about their age profile. It will firstly ask for the sample size. Then it will …

Member Avatar for pseudorandom21
0
243
Member Avatar for harsha_123

I'm new to c++. I was studying data structures and came to know Linked Lists Lately. We had a problem of finding an item stored inside a linked list and here's the code I wrote using Visual Studio to store and find an item. This code gives me a run …

Member Avatar for harsha_123
0
1K
Member Avatar for daviddoria

Can anyone explain why I can't sort this vector: [code] #include <iostream> #include <vector> #include <algorithm> #include <memory> struct Test { public: Test(const unsigned int input) : a(input){} int a; }; struct SortFunctor { bool operator()(std::shared_ptr<Test>& object1, std::shared_ptr<Test>& object2) { return(object1->a < object2->a); } }; ////////////////////////// int main (int argc, …

Member Avatar for vijayan121
0
4K
Member Avatar for Karlwakim

Hi everybody, Is it possible to write a c++ compiler in c++ ? Its bootstrapping, right ?? In which language are usually written compilers ? Thanks

Member Avatar for vijayan121
0
198
Member Avatar for BCBTP

I have a piece of software, that I would like to license and protect but I am having a hard time finding the right license, and how I would go about with it. Is there a license that allows: - Free distribution of the executable and DLL's - Costs money …

Member Avatar for vijayan121
0
197
Member Avatar for Sarkahn

This is a way to force a given aspect ratio of a window any time the user tries to resize or cascade it. [CODE] double aspectRatio = 640.0 / 480.0; WPARAM sideBeingDragged = 0; LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CLOSE: DestroyWindow(hwnd); …

0
491
Member Avatar for triumphost

I have an idea for a program but I don't know if its possible. I want to write a program that can read commands from a file.. For example, I've seen bots that can parse and read javascript for games and execute whatever is in the .java file.. How can …

Member Avatar for triumphost
0
178
Member Avatar for lastbencher

C++ course has started in my college. I would like to know the best beginner book for C++. My teacher has referred Robert Lafore and The Complete Reference. Since there are a lot of suggestions given in the sticky thread, I am confused. Thanks in advance :)

Member Avatar for lastbencher
0
226
Member Avatar for harvybcn

I have a Win32 Application in C++. At runtime, It loads a Matrix stored as TXT file in the working directory with I/O functions. I have problems to distribute my program (EXE and DLL) because people normally forget to move the text files together with the Application. How can I …

Member Avatar for alexb119
0
2K
Member Avatar for khelly

at first, plec correct me this one... [code] std::string explanation; // this upper coding char explanation; //after entering void to display if(item_code=='A') explanation='BABY WEAR'; else if(item_code=='B') explanation='CHILDREN WEAR; else if(item_code=='A') explanation='LADIES WEAR'; else if(item_code=='A') explanation='MENSWEAR';[/code] BABY WEAR and others was error, what should i put? plz correct my coding above …

Member Avatar for gusano79
0
164
Member Avatar for Reeseoo

Hi all new to this forum, just thought i'd post in here because i am having a bit of trouble with an assignment... basically i have this class in a header file called Product.h... [CODE] class Product { private: int _id; unsigned int _price; public: }; [/CODE] I access this …

Member Avatar for Reeseoo
0
534
Member Avatar for joydsouza90

:?: Is there any way, in Turbo C++, by which we can make the mouse disappear when it enters a certain area of the screen ? I have tried this but it doesnt seem to work completely.... ------------------------------------------------------------------------------------[code=c] void initmouse() { union REGS in,out; in.x.ax=0; int86(0x33,&in,&out); } void showmouse() { …

Member Avatar for sourabhjaiswal
0
1K
Member Avatar for sansalama

Hi all I have a program, which I can do and in that program the user can enter information if he had missed to enter it in the required field and he must to be informed about this option. [CODE]//verification of the PIN Edit6->Text = ""; int digits[10]; AnsiString egn …

Member Avatar for adityatandon
0
121
Member Avatar for nicprog

how to write this in c++??? while (Q not empty) { u = deleteMin (Q) for each v adjacent to u if (v is in Q and w(u; v) < key[v]) { key[v] = w(u; v); //decrease key T[v] = u; }}

Member Avatar for nicprog
0
100
Member Avatar for the_kitoper

I have a problem, whenever I attempt to use the following expression it returns -3. Can you please explain why this is? [CODE] int level = ((RoD * 10) - 50) / 15; std::cout << "Level = " << level << std::endl; [/CODE]

Member Avatar for LRRR
0
175
Member Avatar for Kunal0

Hi, I have a basic understanding of C++ and was creating something myself with a class of 6 integers and a string what I want to do is to be able to find the mode values for each of the six integers and strings I have instantiated a set of …

Member Avatar for ravenous
0
288
Member Avatar for thinkingofaname

hey im using vc++ clr to build my application...im using the datagridview, but im having some problems with it because its quite poorly documented in C++..i want to know a couple of things. 1... how to change the color and text of a single row header cell as well as …

Member Avatar for thines01
0
150
Member Avatar for Azmah

I'm looking at developing programs that run on the desktop, cloud (ie. web app), and other devices. I'm looking at how I can code this in C++ and be able to communicate to a server and/or to the client's computer. Is this even possible and do I need the server …

Member Avatar for Azmah
0
153
Member Avatar for thinkingofaname

hey i wanna make C++ program that makes music files but i don't want to use the beep function because that's to simple..and as far as i know doesnt save as a music file....i've looked at csound but that looks a bit to tricky..can u suggest any library's that have …

Member Avatar for thinkingofaname
0
173
Member Avatar for Labdabeta

I have been teaching myself algorithms and I am stuck with the AlphaBeta AI algorithm. I want to test my knowledge of it with a TicTacToe simulation. The thing is I want it to be easy to modify for any two player game and I cannot figure out how to …

Member Avatar for Labdabeta
0
169
Member Avatar for teha_toshio

i`ve done a few codes and i compile it so that i can review it but it got stuck when i want to assign a room. i dont know why.. can someone please help me to fix this please...[CODE]#include <iostream> #include <vector> #include <cstdlib> #include <set> #include <algorithm> #include <string> …

Member Avatar for teha_toshio
0
234
Member Avatar for manfredbill

please help new to c++ programming in this program am trying to input 5 students information and get there output but i got wired error {illegal structure operation} [B]please help [/B] #include <iostream.h> #include <conio.h> struct student { int no; char name[20]; float degree; }; void main() { student s; …

Member Avatar for LRRR
0
3K
Member Avatar for wanguard

This is the program I wrote for my CS project. Compiler is TurboC++. I initially added a lot of garbage code in it and am having a hard time cleaning it up. Can you guys please suggest improvements in the code below. Thanks in advance. [CODE] //STUDENT MANAGEMENT #include<conio.h> #include<fstream.h> …

Member Avatar for adityatandon
0
174
Member Avatar for daviddoria

I know there is an "assignable and copy constructable" requirement for objects in an STL container. For example, you cannot place an object with a const member into a vector. [code] #include <vector> // /home/doriad/Test/Test.cxx:3:8: error: non-static const member ‘const int MyClass::x’, can’t use default assignment operator // struct MyClass …

Member Avatar for mike_2000_17
0
169
Member Avatar for d3m0n

Recently I started working with game development and I came with a problem, when I started working with this SDL_image.h library and I can not understand why the program, does not display the image, screen just flashes and disappears, I can't figure out what's the problem. I am using Microsoft …

0
103
Member Avatar for daviddoria

If I want to expose an iterator to a class member container, I can do so like this: [code] class PatchCollection { public: // Iterator interface typedef std::set<Patch>::iterator iterator; typedef std::set<Patch>::const_iterator const_iterator; iterator begin() { return SourcePatches.begin(); } iterator end() { return SourcePatches.end(); } private: std::set<Patch> Patches; }; [/code] However, …

Member Avatar for mike_2000_17
0
211
Member Avatar for Karlwakim

Hi everybody, I am learning c++ and i want to develop GUI applications Is Directx efficient for GUI apps ? Not games, just gui software. thanks

Member Avatar for LRRR
0
152

The End.