Posts
 
Reputation
Joined
Last Seen
Ranked #456
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
~21.6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for sjcomp

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
244
Member Avatar for shrutinr

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
934
Member Avatar for Donnovan

can i change the value of an int with a pointer. e.q. int n = 20; int *size = n; can i change n by doing this *size++. thanx

Member Avatar for sweetyk2
0
86
Member Avatar for blackmagic01021

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.

Member Avatar for Banfa
0
3K
Member Avatar for punchinello

Here is the code: [CODE] if(i&~077)[/CODE] , where i is an int value. The condition is supposed to be testing whether i is within a proper range. But how? Thank you very much!

Member Avatar for punchinello
0
77
Member Avatar for VilePlecenta

[CODE]class C_Class { public: struct _Get { void foo( void ) { m_Var = 0; } }Get; struct _Set { }Set; long m_Var; };[/CODE] I like to organize my functions with get and set structures [CODE] Get.ThisThing(); Set.ThisThing();[/CODE] But my structure's functions cant access the classes members unless I make …

Member Avatar for Banfa
0
124
Member Avatar for john10

Hi, I'm new to C++. I'm having trouble detecting space bar as an input. I'm unfamiliar with using the char data type. I've tried using ASCII decimal numbers but only detects the '.' . And I'm unsure how to go about this without using string or anything advanced. [CODE] char …

Member Avatar for john10
0
2K
Member Avatar for replax

Hello, i got a problem with identifieng my classes upon its static ID number. Upon creation of each class, it recieves its individual number, the numbers are ascending from 0 to "endless". So now, I want to do a loop like this [code=c++] for(int i = 0; i <= Class::GetMaxIDNumber(); …

Member Avatar for mattjbond
0
231
Member Avatar for Loranus

Hello for my C++ programming class I am programming a Dictionary program that allows the user to enter in definitions and stores them between 2 classes. Dictionary which will contain all my entries and Entry which will contain the definition for every word that the user inputs. Now when they …

Member Avatar for mattjbond
0
105
Member Avatar for n.utiu

I am working at a project that is supposed to run a python script. Here is my main class: [CODE] #include <iostream> #include "scripting.hpp" int main(void) { cScripter oScripter; std::vector <double> vectMy (7, 32); oScripter.doRunScript (&vectMy, "test.py", "function"); return 0; } [/CODE] And here are respectively scripter.hpp and scripter.cpp : …

Member Avatar for n.utiu
0
147
Member Avatar for atticusr5

Ok so I am a total newbie, and for our last programing assignment in my class we are going over Binary Search Trees. Out assignment is to take an older program and make it into a binary search tree. I am using Visual Studio and I have gotten past all …

Member Avatar for mattjbond
0
1K
Member Avatar for Naftel23

Hi there, ive been comin here for about a month glancing at forum posts and the practice thread.. I have been self teaching myself C++ for a few months, and it was pretty challenging at first, my biggest problem is memorization.. so anyways... i was wondering if anyone could help …

Member Avatar for Naftel23
0
71
Member Avatar for vbx_wx

[CODE] void open_key(HKEY* Key , HKEY key , LPCTSTR subkey) { cout << Key[1] << endl; RegOpenKeyEx(Key[1] , subkey , 0 , KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE , &key); } int main() { HKEY keys[] = {HKEY_CLASSES_ROOT , HKEY_CURRENT_USER , HKEY_LOCAL_MACHINE , HKEY_USERS , HKEY_CURRENT_CONFIG}; open_key(&keys[1] , hkey , "Software"); } [/CODE] …

Member Avatar for vbx_wx
0
68
Member Avatar for daviddoria

Is there a data structure that lets me push and pop things onto/off of a queue, but also doesn't allow duplicates? E.g. I want [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. …

Member Avatar for mattjbond
0
152
Member Avatar for DawnDenise

Volunteer C++ Gurus. Thank you in advance for your time. This site has saved my sanity. I am working with my longWords function and cannot get it to stop displaying the same value (2293264). I know that my code is a little janky because I modified it from array format …

Member Avatar for mattjbond
0
155
Member Avatar for anuj10

Write a C++ program that reads a series of 12 temperatures (floating-point numbers) from an input file. It should prompt the user for the name of the input file. The input file should be place in the same directory where your source program resides. It should write out on the …

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

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

Hi there, i'm trying to make a program which translates a word from one language to another, using files (one file for each language) i'm using fgets, to read a line from the file and then comparing it to what the user entered, and strcomp() to see if the words …

Member Avatar for mattjbond
0
138
Member Avatar for deanus

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

Member Avatar for deanus
0
106
Member Avatar for ischuldt

I wrote this distructor one way, but the person who code reviewed it seems to think it's better and more readable the other way. I disagree. It's probably more a matter of preference, but what do you think... [code] RfPrinter::~RfPrinter() { if (!hub_.empty() && !name_.empty()) { clearbuf(rfunitlock); rul_hub = hub_; …

Member Avatar for Fbody
0
133
Member Avatar for metdos

For example, [CODE]MyClass *stable; if(..){ MyClass temp; stable=&temp; } stable.myVariable;[/CODE] Code snippet above does not work, because destructor of temp object is called. How Can I Increase Scope of "temp" object? Thanks.

Member Avatar for mattjbond
0
172
Member Avatar for myluvstefan

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
293
Member Avatar for LemonLemon

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
130
Member Avatar for theblastedfool

Hey guys, ive been working on this code for the past couple of hours and I am trying to do the following problem. Write a program that reads the le generated by randGen.cpp (in Problem 1) and stores the numbers in an array of type int. You can assume that …

Member Avatar for mattjbond
0
200
Member Avatar for rkp728

I am getting the following error while building the code in VC: error C2143: syntax error : missing ')' before '&' on building the below code: [CODE]typedef unsigned int uint4; void Find(uint4& a, uint4 b, uint4 c); void Find(uint4& a, uint4 b, uint4 c) { . . . . }[/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: [code]template <typename T, T test::* PtrToMember> class test{ …

Member Avatar for trantran
1
555
Member Avatar for timbomo

#include <iostream> #include <ctime> #include <cstdlib> using namespace std; i am having trouble putting functions in int main(). can someone show me how??? i want to put these function def. in int main() [CODE]int score_num(int& ns1,int& ns2,int& ns3, int& ns4, int& ns5, int& n6, char& gam_answ); int roll_hold(int roll, int …

Member Avatar for mattjbond
0
412
Member Avatar for rkp728

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
302
Member Avatar for timbomo

i got errors and i cant find out what they meant i have went down the program line by line trying to figure them out and i am having no success. I am trying to use call by call values and parametrers n this program. (list of errors are below) …

Member Avatar for mattjbond
0
335
Member Avatar for timbomo

error: default argument for `int&ns1' has type `int'. i cant figure out why this error is popping up it says the error is on line 3, anyone know how to help? [CODE]#include<iostream> using namespace std; void score_num(int &ns1=0,int &ns2=2,int &ns3=3, int &ns4=4, int &ns5=5, int &n6=6, char gam_answ); void display_score(int …

Member Avatar for mattjbond
0
186