Posts
 
Reputation
Joined
Last Seen
Ranked #457
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
95% Quality Score
Upvotes Received
25
Posts with Upvotes
24
Upvoting Members
17
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
7 Commented Posts
0 Endorsements
Ranked #630
~22.0K People Reached
Favorite Forums
Favorite Tags
Member Avatar for sjcomp

[QUOTE=sjcomp;1148820]Hello, I am using a singleton pattern, which works fine. But when I decided to have a singleton of a nested class that is privately declared. [CODE]class A : public CSingletonTmpl<A> { class B : public CSingletonTmpl<B> { }; }; A* CSingletonTmpl<A>::s_Singleton = NULL; A::B* CSingletonTmpl<A::B>::s_Singleton = NULL; [/CODE] The …

Member Avatar for madGambol
0
248
Member Avatar for shrutinr

[QUOTE=shrutinr;1186620]Hi , I m doing my project in vc++.. I need to interact my vc++ project with NI MAX software.. I m taking Frame API for ineracting to UPS . I included "nican.h" header file for that. I didnt missed any brackets... but while executing i m getting error like …

Member Avatar for Smalls518
0
946
Member Avatar for Donnovan

No. This will increment the pointer first and then deference the result. You would require paretheses here to achieve the result you want. [CODE](*size)++[/CODE] This is because unary unary operators like ++ associate right to left.. Also you have a problem in that the expression [CODE]int *size = n; [/CODE] …

Member Avatar for sweetyk2
0
86
Member Avatar for blackmagic01021

[QUOTE=blackmagic01021;1198621]I have a void type array. I want to create a function which will read 12 bits in each time and store it in a unsigned int type variable. Any ideas? Thank you.[/QUOTE] So you wish to extract the first 12 bits from each element in your void array? How, …

Member Avatar for Banfa
0
3K
Member Avatar for punchinello

~077 is the unary of the octal value 77; octal 77 will correspond to the low order 6 bits being set of a word. In 32 bit hex word 0x0000003f. the unary of this flips all the set bits to 0 and all 0 bits to 1 giving 0xffffffc0 this …

Member Avatar for punchinello
0
77
Member Avatar for VilePlecenta
Member Avatar for Banfa
0
126
Member Avatar for john10

>> will read to the next whitespace. ie. space character so it wont pick up your space. Do you have to use space? You can explicitly read the next char from the stream though. Check out the other stream functions available to you. Is there anything else you could use.

Member Avatar for john10
0
2K
Member Avatar for replax

I'm not sure I fully understand your question here. Could we see some code. Just pare down some example classes to the bare minimum required to illustrate what your question is asking and post them.

Member Avatar for mattjbond
0
232
Member Avatar for Loranus

Dictionaries are generally represented by a form of Map as mentioned in previous posts. your solution will wind up with you having many thousands of distinct objects, one for each word entered. this seems to me to be a bit messy. Try reading up on Maps before moving on...

Member Avatar for mattjbond
0
106
Member Avatar for n.utiu
Member Avatar for atticusr5
Member Avatar for Naftel23

add the scores together and divide by three. Or if you have n values to average add em together and divide by n.

Member Avatar for Naftel23
0
72
Member Avatar for vbx_wx

Is that what HKEY_CURRENT_USER is defined to? I'm not going to check for you but I suspec that it is. You would need to provide some method of producing a textual representation of this defined value and printing that instead of the value itself.

Member Avatar for vbx_wx
0
69
Member Avatar for daviddoria

[QUOTE=daviddoria;1183663] [code] queue a; a.push(1); a.push(2); a.push(2); a.push(3); [/code] to only have 3 elements, because 2 was added twice so the second time it is just ignored. [/QUOTE] But you want this to have FIFO behaviour? Why not create your own queue class, based on a deque for instance, which …

Member Avatar for mattjbond
0
163
Member Avatar for DawnDenise

I doubt that this will even compile as it stands. You have no return from your longWords function. As for converting a function from an array to a pointer it should not make too much of a difference. When you pass an array argument as a pointer you are passing …

Member Avatar for mattjbond
0
156
Member Avatar for anuj10

or if you wish to read the data items one at a time [CODE] ifstream openFile( "Data.txt" ); float temp; while( openFile >> temp ) { ... }[/CODE] When you write [CODE]openFile >> temp[/CODE] the return value of the input statement is the class object from which you are reading …

Member Avatar for mattjbond
0
262
Member Avatar for shilpa.joshiv@g

[QUOTE=shilpa.joshiv@g;1182773]hi,,, i have converted the image in to gray and created itz histogram...nw i m applying various filters on the gray image...my problem is: 1.. want to display the result image after filtering in dialog box... for this i have created the dialog class...but not getting how to send the …

Member Avatar for mattjbond
0
112
Member Avatar for Darkwarrior_331

Traditionally a dictionary would be represented as a Map. Where the word would act as the key value into the map and the definition would correspond to the value for that key. Maybe you could produce a map for language conversion where the key value is a word in the …

Member Avatar for mattjbond
0
150
Member Avatar for deanus

[QUOTE=deanus;1181033]Hi I've just started out in c++, can anyone tell me how to use pointers which hold addresses of objects ? How do you access the object fields from this type of pointer, especially strings (array of chars)... I'm using a Dev c++ 4.9.9.2 compiler....[/QUOTE] you might want to post …

Member Avatar for deanus
0
106
Member Avatar for ischuldt

SESE (single entry single exit) was quite a big thing at one point, more especially in C as it was felt that it made functions easier to maintain amongst other things. In C++ where you have exceptions as another way in which a function can be exited it is difficult …

Member Avatar for Fbody
0
134
Member Avatar for metdos

Depends how much you want to increase it by. Simply declare it in a lerger scope. instead of [CODE]MyClass *stable; if(..){ MyClass temp; stable=&temp; } stable.myVariable;[/CODE] try [CODE]MyClass *stable; MyClass temp; if(..){ stable=&temp; } stable.myVariable;[/CODE] if you really don't want temp hanging around any longer that necessary then enclise it …

Member Avatar for mattjbond
0
174
Member Avatar for myluvstefan

[QUOTE=myluvstefan;1177841]Hi, I've spent a lot of time on this program and I'm stuck. My assignment is to prompt for two input strings. Print out each string Concatenate string1 and string2 and store the concatenated string into string3 without changing what's stored in string1 or string2. print out the concatenated string. …

Member Avatar for mattjbond
0
327
Member Avatar for LemonLemon

[QUOTE=LemonLemon;1180716]I am using VC++ 2008. I want to rotate the Bitmap in my MFC application. I tried the GetPixel and SetPixel functions, but the performance is too slow. There seems no Bitmap rotation example using MFC class on the internet Can anyone give me some idea? Sample code will be …

Member Avatar for mattjbond
0
131
Member Avatar for theblastedfool

you need to declare stream objects of type ifstream. eg. [CODE] ifstream inputfile; inputfile.open(filename);[/CODE] ifstream is a class definition, not a concrete object which you can use. You have to declare an instance of the class to use it. Looking again I see you have done so in you main. …

Member Avatar for mattjbond
0
214
Member Avatar for rkp728

If your code is as posted then the only problem I can see is the extra ',' in you function prototype. [CODE]void Find(uint4& a, uint4 b, uint4 c[B][I],[/I][/B]);[/CODE]

Member Avatar for mattjbond
0
73
Member Avatar for trantran

> This is likely a stupid question, but I can't figured out by myself how to pass a pointer to a member function of a templatised class in its own template parameters. > More clearly: > I would like to have this to work out: template <typename T, T test::* …

Member Avatar for trantran
1
561
Member Avatar for timbomo

As I have told you in one of your numerous other posts on this subject you need to get hold of an introductory programming text and read the first couple of chapters. You are lacking in some really fundamental concepts here, how to declare and use variables, how to declare …

Member Avatar for mattjbond
0
413
Member Avatar for rkp728

[QUOTE=rkp728;1175860]I want to fill a structure and then print it. How to print the values of the structue? The structure is: [CODE] #define UINT32 unsigned int #define INT32 int #define UCHAR unsigned char typedef struct CheckSumPair { UINT32 weakcs; // The weak, rolling Adler32 checksum. UCHAR StrongCS[10]; };[/CODE] I have …

Member Avatar for Banfa
0
339
Member Avatar for timbomo
Member Avatar for timbomo

Default arguments should be at the right of the declaration. eg. [CODE]int func( int x, int y = 1, int z = 2 );[/CODE] you cannot have variables which do not have a default definition on the right hand side of those that do. [CODE]int func( int x = 1, …

Member Avatar for mattjbond
0
187