49,755 Topics

Member Avatar for
Member Avatar for anuj.juthani

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 …

0
210
Member Avatar for SAM2012

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 { …

Member Avatar for DeanMSands3
0
186
Member Avatar for MrEARTHSHAcKER

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* …

Member Avatar for MrEARTHSHAcKER
0
231
Member Avatar for Chuckleluck

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 …

Member Avatar for mike_2000_17
0
179
Member Avatar for triumphost

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 …

Member Avatar for L7Sqr
0
135
Member Avatar for adityawkhare

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!!!

Member Avatar for Ancient Dragon
0
545
Member Avatar for haris riaz

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 …

Member Avatar for histrungalot
0
159
Member Avatar for dinosaur123

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 …

Member Avatar for dinosaur123
0
264
Member Avatar for DeanMSands3

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 …

Member Avatar for DeanMSands3
0
619
Member Avatar for suhasgh

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...

Member Avatar for DeanMSands3
0
233
Member Avatar for cppgangster

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 …

Member Avatar for deceptikon
0
177
Member Avatar for triumphost

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 …

Member Avatar for triumphost
0
937
Member Avatar for valestrom

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 …

Member Avatar for thines01
0
311
Member Avatar for cyther

can somebody convert this line to c++? thanks fscanf(in, "%s %s" ,student[x].name, student[x].num);

Member Avatar for cyther
0
158
Member Avatar for i-teq

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 …

Member Avatar for i-teq
0
379
Member Avatar for Zemorg

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 …

Member Avatar for Clinton Portis
0
1K
Member Avatar for jonnyboy12

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 …

Member Avatar for jonnyboy12
0
282
Member Avatar for triumphost

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; …

Member Avatar for Ancient Dragon
0
208
Member Avatar for #include <lou>

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 …

Member Avatar for JasonHippy
0
166
Member Avatar for ravenous

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 …

Member Avatar for santakdalai90
0
305
Member Avatar for Suzie999

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 …

Member Avatar for Suzie999
0
2K
Member Avatar for basom

#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; }

Member Avatar for nullptr
0
268
Member Avatar for stereomatching

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 …

0
72
Member Avatar for Valiantangel

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 <<' …

Member Avatar for MandrewP
0
117
Member Avatar for suhasgh

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......??

Member Avatar for suhasgh
0
110
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
219
Member Avatar for Valiantangel

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 …

Member Avatar for Valiantangel
0
97
Member Avatar for swissknife007
Member Avatar for Gribouillis
0
149
Member Avatar for mrnutty

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 …

Member Avatar for nezachem
1
666
Member Avatar for tedtdu

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) != …

Member Avatar for Labdabeta
0
252

The End.