49,761 Topics

Member Avatar for
Member Avatar for kux

I have a document/view aplication that opens a bitmap I use the following OnDraw override to draw the bitmap on a window and OnOpenDocument to opening the image from file The bitmap handle ( HBITMAP bmaphandle ) is taken from the Document object that does LoadImage in it's OnOpenDocument method …

Member Avatar for kux
0
172
Member Avatar for mpCode

I am working on a small project that contains a vector of base class pointers and my question is, is there anyway to tell which derived class is being stored in the container. for example... we have a base class named creature and two derived classes named, alien and monster. …

Member Avatar for mrboolf
0
151
Member Avatar for zinashamaa
0
74
Member Avatar for k59smooth

I'm trying to input these letters into and array using the following an tex char Letters[26] = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; my complier has an error reading too …

Member Avatar for Nick Evan
0
81
Member Avatar for k59smooth

I'm trying to input these letters into and array using the following an tex [TEX]char Letters[26] ={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; [/TEX] my complier has an error reading too …

Member Avatar for Nick Evan
0
284
Member Avatar for DJPlayer

I'm getting ready for a test in a couple days. I'm trying to find some decent well commented examples of programs that use polymorphism and inheritance (public,private,protected). Also it was mentioned about special circumstances on using const for a variable within the say private area of a class. Any assistance …

Member Avatar for Nick Evan
0
87
Member Avatar for Stefano Mtangoo

Hello all, greetings I wonder where I can get API for afore mentioned DLL files? I need to use them in small app for personal exercises and needs API docs Also would like to know if there is anyone acquainted with Ctypes? Thanks all

0
62
Member Avatar for madmaxx350

Hey guys :) i'm new at programming in C++ and i'm stuck at an assignment that im suppose to write I need to Write a string function that gets a word at random from a file and returns it as the value of the function. It should use a random …

Member Avatar for vmanes
0
71
Member Avatar for brechtjah

Hi, I'm having some frustrating issues with char/strings. I have a function which returns an unsigned short integer, the unsigned short integer is ALWAYS 1 char long. So if I try this code: [code] number[2] = function(); [/code] So, number[2] should give me the number I want, however, it gives …

Member Avatar for brechtjah
0
186
Member Avatar for glecymay

i hope you can help me regarding computing the running time of a program in C++ environment the specification is like this: i will make a program that can read another file which is a program too in C++. I would like to compute the main() alone of the file. …

Member Avatar for dmanw100
0
59
Member Avatar for Manutebecker

I want to be able to bring the single instance class into a function of another class without having to take each seperate little variable from the class and inject it in, can I just do something like void Yeah(class *The Class) and then pass the class in easily??? Or …

Member Avatar for Rashakil Fol
0
83
Member Avatar for 666kennedy

i have an array weights[16][60] 16 rows of 60 columns if you are changing indiviual elements it goes from weights[0][0] to weights[15][59] right? see if im using them in a loop for instance [CODE]]for(int i = 0; i < 16; i++) {[/CODE] so each element is used would it be …

Member Avatar for Rashakil Fol
0
83
Member Avatar for ishitasheth

Write a client-server application program to design a chatting room implementation using sockets to communicate between a server and clients. For this project, the followings are minimal requirements. Registration phase. 1.Each client will register to the server for joining a chatting with its own nick name. 2.One client will open …

Member Avatar for Rashakil Fol
0
115
Member Avatar for arreyes

If you make a vector of a class of no designated size, as you reserve spaces inside the vector will it just make a default instance from the constructor?

Member Avatar for ArkM
0
118
Member Avatar for 666kennedy

this is my sub proceedure [CODE]/****************************************************************************** * * Name: patpixselect * Parameters: none * Returns: patpix[] * Globals: none * Description: database for which pixels for which pattern *****************************************************************************/ int patpixselect (int pat); { float patpix[9] ; // array for pixels in patterns if (pat == 1) { patpix[0] = …

Member Avatar for VernonDozier
0
71
Member Avatar for k59smooth

I new to a C++, I downloaded the Microsoft Visual C++ compiler. I copy/pasted a simple program. [code=cplusplus] #include <iostream.h> #include <stdlib.h> int main() { cout << "This is my first C++ program." << endl << endl; system("PAUSE"); return EXIT_SUCCESS; } [/code] The compiler has an error that reads Cannot …

Member Avatar for Ancient Dragon
0
87
Member Avatar for kunlamp

[code=cplusplus] #include<iostream.h> #include<malloc.h> #include<stdlib.h> struct point{ float x; float y; point *next; }; point * create(int count) { point *p,*h,*s; h=(point *)malloc(sizeof(struct point)); if(h==NULL) { cout<<"Malloc memory error"<<endl; } /********************************************Init head**********************************/ h->x=NULL; h->y=NULL; h->next=NULL; /********************************************Init head**********************************/ p=h; for(int i=0;i<count;i++) { s=(point *)malloc(sizeof(struct point)); if(s==NULL) { cout<<"Malloc memory error"<<endl; } cout<<"cin …

Member Avatar for kunlamp
0
126
Member Avatar for elsa87

hi everyone the program below is a function that should give the number of items greater than a number entered by a user.(unsorted list ADT) ex: input 3 unsorted list contains: 2 6 8 1 5 9 8 output should be 5 here is my try by there are alot …

Member Avatar for WaltP
0
207
Member Avatar for freelancelote

Hi, the following code works fine, that is, strcpy effectively copies the whole string on temporal to word. [CODE=cpp] char word[20]; char temp[ ] = "hola"; cout << temporal << endl; strcpy(word, temporal); cout << word << endl; [/CODE] However, if I try to use the heap to store the …

Member Avatar for freelancelote
0
136
Member Avatar for 666kennedy

sorry if this a bit of a pain and there are other threads to read about this but can anyone explain how arrays work a bit, i need a quick refresher course. like how they work, are they like the equivalent of stacks in assembly language? and say you set …

Member Avatar for mrboolf
0
112
Member Avatar for tnvkrishna

OS: windows vista 32 bit. I was searching the web for a compiler which has lesser numbers of issues and with good written help available. I am thinking of vc++ or blood shed dev c++ Then I came across this term ANSI ..... Is it necessary for a compiler to …

Member Avatar for jbennet
0
214
Member Avatar for CantDoThis

well im doing a program that should output: A BB CCC DDD EEEE FFFFF using 2 loops. im on Dev-C++ 4.9.9.2 im all new 2 this an this is what i got so far, some help will b great to finish this =] [code=cplusplus] #include<iostream> #include<iomanip> using namespace std; int …

Member Avatar for mujash.techee
0
153
Member Avatar for brechtjah

Hello, I'm experiencing a little problem with what I'm trying to do: I've created a large number of buttons with Photoshop, these however, already look like buttons, and are rounded. However, when I put them on a BUTTON control the button looks ugly because it has another button on it. …

Member Avatar for William Hemsworth
0
128
Member Avatar for shankhs

I was trying to write a program that takes an input from a file which is located in Desktop not the default directory where the program is saved [code] #include <iostream> #include <fstream> #include <stdlib.h> using namespace std; int main() { ifstream fin; string str="C:\Documents and Settings\shankhs\Desktop\ccs\Assignment CCS.txt",temp=""; cout<<str<<endl; for(int …

Member Avatar for shankhs
0
141
Member Avatar for manzoor

Well see the above code [CODE] int a = 10; int* p1 = &a; int* p2 = p1; // Copies the address right?[/CODE] But what happens here? [CODE]char* str1 = "Hello"; char* str2 = str1; // What happens here[/CODE] I tried this code and when I modified str1, str2 remain …

Member Avatar for mujash.techee
0
128
Member Avatar for afg_91320

i cant seem to find what is wrong with this piece of code: looks good to me-but my hw says it has an error in the code. [code] struct TwoVals { int a = 5; int b = 10; }; int main() { TwoVals varray[1]; varray.a[0] =1; return0; } [/code]

Member Avatar for Narue
0
171
Member Avatar for Lokolo

[code] transactionInfo = date + " - " + _strtime( time ) + "New Customer - 1001 - Olly"; [/code] Ok so I've been trying to find it everywhere in C++ reference guides but it seems I can't do the above ^^ (says I cannot add 2 pointers). date is …

Member Avatar for Alex Edwards
0
187
Member Avatar for atish00

I have to make a project today itself on turbo c++ :- It should have OOP. Classes. and use of database i.e I/O on text files. Can anyone suggest a unique topic and I will be asking help related to the same here =)

Member Avatar for atish00
0
77
Member Avatar for Elmismo

Hi, I have these errors: --------------------Configuration: IP_devllink_06 - Win32 Debug-------------------- Linking... IP_devlink_06.obj : error LNK2001: unresolved external symbol _DLClose@4 IP_devlink_06.obj : error LNK2001: unresolved external symbol _DLOpen@24 Debug/IP_devllink_06.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. IP_devllink_06.exe - 3 error(s), 0 warning(s) The probloem is that I am …

Member Avatar for ArkM
0
365
Member Avatar for spikeglow

can u pass template class objects as parameters to friend functions of the same class?? i tried sumthin like... [code=cplusplus] template<class T> class array { T a[10]; int n; public: friend istream& operator>>(istream&,array&); friend ostream& operator<<(ostream&,array&);}; istream& operator >>(istream& din,array& b) { din>>b.n ; //size of array for(inti=0;i<b.n;i++) din>>b.a[i]; return(din); …

Member Avatar for vijayan121
0
414

The End.