Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #4K
~6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Garrett2011

Hello I encountered following info at [this page](http://en.wikipedia.org/wiki/Call_stack#Overlap): For some purposes, the stack frame of a subroutine and that of its caller can be considered to overlap, the overlap consisting of the area where the parameters are passed from the caller to the callee. In some environments, the caller pushes …

Member Avatar for sepp2k
0
311
Member Avatar for Garrett2011

Consider following function: [CODE]void func(const char & input){ //do something }[/CODE] Apparently it makes sense for the parameter to be constant value not reference to constant, Now may a compiler optimize that to constant value so that it'll be the same as following ? [CODE]void func(const char input){ //do something …

Member Avatar for Narue
0
135
Member Avatar for Garrett2011

In a scenario that caller doesn't necessarily need callee to use memory of one of its local variables of a primitive type to track that variable later for anything, I know that when passing that variable to a callee function; it'd be done by value and that makes total sense …

Member Avatar for TechnoCat
0
135
Member Avatar for Garrett2011

Is there any way to inline just some selective calls to a particular function not all of them? by function I also mean class operators like assignment operator, constructors like copy constructor. The only form I know is declaring function as such at beginning and that's supposed to effect all …

Member Avatar for Narue
0
148
Member Avatar for Garrett2011

Beforehand I know how to define a macro in a file like header file by using #define directive but I want to know, regarding Visual C++ compiler, is there any kind of file which is specifically used to hold a macro so that we can use it anywhere in our …

Member Avatar for Garrett2011
0
202
Member Avatar for Garrett2011

considering visual C++ compiler, Lets say I've got a file with whatever extension and it contains 100 bytes of data which are exactly the data that I want to initialize an array of char data type with a length of 100 characters with, Now apparently one way is to read …

0
149
Member Avatar for Garrett2011

Suppose we've got two integer and character variables: [CODE]int adad=12345; char character;[/CODE] Assuming we're discussing a platform in which, length of an integer variable is longer than or equal to three bytes, I want to access third byte of this integer and put it in the character variable, with that …

Member Avatar for r.evrard
0
210
Member Avatar for rtllz

hi, i was wondering if someone could help me make a number generator. By that i mean have it start from 0 then go 00 then 000 and so on until lets five zeros(00000) and after that make it change the last number by 1. Any help would be appreciated, …

Member Avatar for mrnutty
0
118
Member Avatar for bleedi

So, here's my problem: I have a superclass: [CODE] Class SuperClass { virtual someMethod() = 0; } [/CODE] ... and then I have multiple classes that inherit SuperClass. Now, if I want to put objects made from the subclasses to a single vector<SuperClass>, how could I get the abstract function …

Member Avatar for bleedi
0
433
Member Avatar for Garrett2011

suppose we have following function: [CODE]void someFunction(int * araye){ for (int i=0;i<5;i++) cout <<araye[i]<<' '; cout <<'\n'; }[/CODE] can we pass an array to this function by following syntax, under upcoming c++0x standards? : [CODE]someFunction({1,2,3,4,5});[/CODE] if that's true, will we even be able to use this syntax in any case …

Member Avatar for vijayan121
0
255
Member Avatar for Garrett2011

was the idea of nested functions considered to be useless during the time of developing older c++ standard, because its usage is basically covered by another concept like object-oriented programming; or it wasn't implemented just as a matter of simplification?

Member Avatar for arkoenig
0
529
Member Avatar for Jsplinter

Simply put I wish for text entered in one edit box to then appear in another edit box. I have created a MFC dialog and read many tutorials, but I'm still stuck. Here is my current DDX function: void Ctextentry23Dlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDIT1, name); DDV_MaxChars(pDX, name, 20); DDX_Text(pDX, …

Member Avatar for Jsplinter
0
529
Member Avatar for dolly_olaide

Hello, I am currently working on body detection and face recognition using OpenCV. But I want to create a GUI using Visual C++. I am unfamiliar with it, so I wanted to know if anyone has any tutorials or what can lead me into the right direction. Thanks in advance …

Member Avatar for Garrett2011
0
102
Member Avatar for Garrett2011

take following class and two object definitions: [CODE=c++] class Rect{ public: enum centimeter; enum meter; Rect(double len,double wid,enum centimeter){ length=(len/100); width=(wid/100); } Rect(int len,int wid,enum meter){ length=len; width=wid; } //rest of implementation private: double length;//in meters double width;//in meters }; Rect obj1(10,5,Rect::centimeter()); Rect obj2(10,5,Rect::meter());[/CODE] two previous constructors have dummy enum …

Member Avatar for Garrett2011
0
2K
Member Avatar for Garrett2011

take two following classes: [CODE=c++] class Test1{ public: Test1()=default; Test1(char in1,char in2):char1(in1),char2(in2){} char char1; char char2; }; class Test2{ public: Test2()=default; Test2(char in1,char in2):char1(in1),char2(in2){} private: char char1; char char2; };[/CODE] I know in c++0x both of these classes are considered as POD types and we can initialize objects of them …

Member Avatar for Garrett2011
0
273
Member Avatar for Garrett2011

take two following classes and their constructors as samples: [CODE=c++] class One{ public: One(int a,int b):adad1(a),adad2(b){} private: int adad1; int adad2; }; class Two{ public: Two(int input[]){ for (int i=0;i<10;i++) araye[i]=input[i]; } private: int araye[10]; };[/CODE] considering objects with static storage duration, I think first constructor can be applied during …

Member Avatar for Garrett2011
0
303
Member Avatar for Garrett2011

How does an optimizing c++ compiler determine when a stack slot of a function(part of stack frame of a function) is no longer needed by that function, so it can reuse its memory? . By stack slot I mean a part of stack frame of a function, not necessarily a …

Member Avatar for Garrett2011
0
411
Member Avatar for Garrett2011

Is there a macro that can get a text as input like "abc" and then extract characters in that text and generate a code using them, something like "{'a','b','c'}" ? thanks.

Member Avatar for mike_2000_17
0
205
Member Avatar for Garrett2011

Suppose we have following two classes: [CODE=c++] class Temp{ public: char a; char b; }; class Final{ private: int a; char b; char c; public: Final(Temp in):b(in.a),c(in.b){} //rest of implementation };[/CODE] can we initialize an object of the Final class with following syntax in upcoming c++0x standard: [CODE=c++] Final obj(Temp{'a','b'});[/CODE]

Member Avatar for mike_2000_17
0
249