49,761 Topics
| |
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 … | |
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. … | |
How can I use C++ programme from vb.net thanks in advance | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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? | |
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] = … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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] | |
[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 … | |
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 =) | |
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 … | |
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); … |
The End.