49,755 Topics
![]() | |
I am developing a IE toolbar using MS VISUAL STUDIO 2010 VC++ I have a popup menu, having two options WEB SEARCH and IMAGE SEARCH. my problem is the pop up menu works fine when i see the output in DEBUG mode ... The pop up menu works fine even … | |
I need your help regarding the message acknowledgement in the queue when the message reaches at the queue. Any help would be highly appreciated. the code for my queue class is; struct ListNode { ListNode(gcroot<message^> msg); gcroot<message^> msg; ListNode* next; }; ListNode::ListNode(gcroot<message^> msg): msg(msg), next(nullptr) {} public class queue { … | |
Hi, I am learning queues and I have found 2 examples. Both examples represent queues with limited size, for example 30. But <queue> allows us to create queue that is not limited by ***pre-set** queue size. Can anyone explain me how have they created something like that? Thanks! ***By *pre-set* … | |
Consider I have this piece of code: #include <iostream> using namespace std; enum TEXTURE { SAND, GRASS, DIRT, ROCK, SNOW }; class grid { public: TEXTURE type; string str; }; grid layer[5]; int main() { layer[0].str = "AAAAA"; layer[1].str = "A A A"; layer[2].str = " A A "; layer[3].str … | |
typedef union { unsigned Color; struct { unsigned char B, G, R, A; }; } RGB, *PRGB; inline RGB Rgb(int R, int G, int B) {RGB Result = {((COLORREF)((BYTE)(R)|((BYTE)(G) << 8)|((BYTE)(B) << 16)))}; return Result;} inline RGB Rgb(COLORREF Color) {RGB Result = {Color}; return Result;} The above is my code … | |
Can anybody here tell me please how to display a notification/message box in c++. suppose i'm making a program for factorial of a no. and i want to display the result in a message box with msg..." Factorial of No. is <fact>". help me please!!! | |
suppose i got a matrix 0 1 0 0 2 0 0 0 4 0 5 0 2 1 3 4 4 5 0 0 0 3 2 0 2 Select a matching by choosing a set of zeros so that each row or column has only one selected. It … | |
Hello again! I am still working on a program, and I am now working on sorting an array. Well, the array is a bunch of strings read from a text file. Some of the strings were turned into integers. I need to take the strings and find a way to … | |
I need GMPXX on MinGW. This is driving me nuts. EDIT: I should mention I've tried using the precompiled MinGW GMP and GMPXX libraries via the **mingw-get**. And they fail. I removed them. I compiled GMP in MSYS with the following line. ./configure --enable-cxx --prefix="/mingw" && make && make install … | |
Hello, i want to create a vector of pointers and delete them,but i am little confused whether my code is OKAY or not. here's my code: vector<Object*> SpriteList; for(i=0;i<10;i++){ Object* tempobj; tempobj=new Object(); SpriteList.push_back(tempobj) } for(int i=0;i < (int) SpriteList.size();i++){ delete SpriteList[i]; SpriteList.erase(SpriteList.begin()+i); } is there any memory Leak??plz help... | |
Dear all, I have been away from c++ for a while and I have just got back and started reading about "c++ concurrency in action". I found an example where the author gives function witch returns thread instance but I can not understand how you can declare a function in … | |
I have the following: typedef union { unsigned Color; struct { unsigned char B, G, R, A; }; } RGB, *PRGB; Then I have: RGB Rgb(XYZ Xyz) { RGB Result; double X = Xyz.X / 100; double Y = Xyz.Y / 100; double Z = Xyz.Z / 100; double Red … | |
I was wondering how to **Connect** to a FTP server in the form of it having Address, Username, and Password. Then be able to either edit or upload a file to a specific folder on the server. Because I am designing a website with a current news box on it … | |
can somebody convert this line to c++? thanks fscanf(in, "%s %s" ,student[x].name, student[x].num); | |
Confusing piece of code... Xcode compiler complains 'No matching function for call to 'init_population' yet another portion of similar code for another function works fine??? Any ideas please. void init_population(int**,ga_vector &,ga_vector &); void init_population(int** donut_population, ga_vector &population, ga_vector &buffer ) { int tsize = GA_TARGET.size(); int double_digit = 0; CRobot … | |
Hey guys, i'm Working On A Project That Gets All Employees And Their Data From the User Then Saves Them in A Txt File ( Fstream ) Anyway, i figured out how to Do That But What im at stuck at now is how to search through the txt file … | |
Hello all . I used to problems with my program shaking when i mioved it off screen. I found code thats supposed to fix it . It came from some program i was tinkering with. Its had many complex textures and all added to its form and the form didnt … | |
What is the difference between these two and why does one compile fine compared to the other :S //MyFile.h #include<iostream> using namespace std; inline std::ostream& operator << (std::ostream& Str, const RGB &Rgb) { Str<<"R: "<<(int)Rgb.R<<" G: "<<(int)Rgb.G<<" B: "<<(int)Rgb.B; return Str; } //Main.cpp #include <iostream> #include "MyFile.h" using namespace std; … | |
Hi, I am trying to access private level members with a Derived class but keep getting: Error1 cannot access private member declared in class 'TimeType'. Here is my code for the Base Header file: . . . class TimeType { private: int hours; int minutes; int seconds; public: virtual void … | |
At work we have a large number of unit tests that try to alert us that we have made changes that have broken our code. Many of these tests work by evaluating functions under known conditions and comparing the result with the known result. The known result is acquired by … | |
I'm having trouble with getpixel function. Sometimes it returns the correct pixel ref and others it returns "4294967295" which I think is "CLR_INVALID" COLORREF color; HDC hdc_ = GetDC(NULL); //get dc of whole screen color = GetPixel(hdc_, 10, 10); std::cout << color << endl; That is the simple code, any … | |
#include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main() { int N,A[8]; cout<<"Enter the number:"; cin>>N; srand(time(0)); for(int i=1;i<=8;i++) { A[i]=rand()%40+10; for(int j=0;j<1;j++) { cout<<A[i]; } cout<<" "; } return 0; } | |
Recently I am studying GIL and concept(htp://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf) and encounter a lot of problems. concept ChannelConcept<typename T> : EqualityComparable<T> { typename value_type = T; // use channel_traits<T>::value_type to access it where ChannelValueConcept<value_type>; //tag1 typename reference = T&; // use channel_traits<T>::reference to access it typename pointer = T*; // use channel_traits<T>::pointer to … | |
Hi i am finding this a challenge.I am suppose to get 12345 12345 but my below code is giving me 1112314151 1222324252 what mistake am i making? #include <iostream> using namespace std; int main() { int row,column; for(row=1;row < 3;row++) { for(column=1 ;column < 6; column++) cout <<column<< row <<' … | |
Hey i have one questio .....plzz do answer........ i have 3 classes A,B and D A is base class........ if B is derived from A.. can we derive C from both A and B......?? | |
I have now read a total of 5 different winsock tutorials and I still do not get how sockets work! Could somebody please explain how to make a program that will allow n computers to share data with each other. As an example could somebody make a 'game' with the … | |
i was learning about Functions from a book.Keyed in the following code to my visual studio express and got two errors: expect a declaration and '{' : missing function header(old-style formal list. what do they mean? Does this have to do with ans/isoi std? #include <iostream> using namespace std; void … | |
I am trying to implement a program to solve 20 + equations . what algo should i use | |
This question is from code chef, named Odd. I believe this is a good problem to play with for all levels. If I can solve it surely anyone else can, cough * only if pi is fake* cough*. Here is the question : [ICODE]The captain of the ship TITANIC is … | |
Dear all. please kindly but freely provide of your ideas and thought about following. I need to get binary bits of variety of files regardless of ASCII, Unicode, or even non-printable etc. I searched following seems to be commonly used but not for all. bits[i] = ((1<<i) & c) != … |
The End.