|
Why don't you keep your wonderful techniques secret?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've never even heard of a "tripleton" class, and we have two different people wanting it within hours of each other?
http://www.codeproject.com/Messages/3229571/Class-Object.aspx[^]
Maybe you should speak with your classmate / colleague and collaborate. His question has answers too.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
If you don't stop using multiple logins to ask the same stupid queries, I'll take it to the admin to have all your logins banned.
I remember warning you once already.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: If you don't stop using multiple logins
He's asking for Singleton-like patters just for limiting his logins...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
p_1960 wrote: if i want to create only 3 objects how can i restrict the class to do the same...
You could start by reading the suggestions that people offer, and trying to implement them in your program.
modified on Sunday, October 11, 2009 3:33 PM
|
|
|
|
|
p_1960 wrote: ...how can i restrict the class to do the same...
By reading here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All,
Actually i am implementing an application for smart card.
But i am confused. whether the read and write methods of SLE4418_28 and
SDI010 will be same or different. I have a sample code for SLE4418_28. So can this code help me to implement the read and write methods for SDI010.
Thanks in advance..
|
|
|
|
|
Hi all,
The following question:
1)string str1 = "a";
2)string str2 = "b";
3)string& refstr = str1;
printf("\n str1: %s,", str1.c_str());
printf("\n str2: %s,", str2.c_str());
printf("\n refstr: %s,\n ", refstr.c_str());
4)str1 = "aa";
printf("\n str1: %s,", str1.c_str());
printf("\n str2: %s,", str2.c_str());
printf("\n refstr: %s,\n ", refstr.c_str());
5)refstr = str2;
printf("\n str1: %s,", str1.c_str());
printf("\n str2: %s,", str2.c_str());
printf("\n refstr: %s,\n ", refstr.c_str());
6)str2 = "bb";
printf("\n str1: %s,", str1.c_str());
printf("\n str2: %s,", str2.c_str());
printf("\n refstr: %s,\n ", refstr.c_str());
displays after each stage :
3)
str1: a
str2: b
refstr: a
4)
str1: aa
str2: b
refstr: aa
5)
str1: b
str2: b
refstr: b
6)
str1: b,
str2: bb,
refstr: b,
May I get an accurate explantion why this is the display for each stage ?
Why after stage 6 the display is not bb for all ?
Thanks in advance,
Eyal
modified on Sunday, October 11, 2009 7:32 AM
|
|
|
|
|
es1968 wrote: May I get an accurate explantion why this is the display for each stage ?
Yes, documentation [^] explains it all:
A reference holds the address of an object, but behaves syntactically like an object.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Pallini,
Thanks for your the answer, but I want to understand why after stage 6, str1 and strref have not been changed after str2 changed to "bb" ?
It's important for me to understand this, probably I miss something.
Best,
Eyal
|
|
|
|
|
es1968 wrote: why after stage 6, str1 and strref have not been changed after str2 changed to "bb" ?
Because nothing is changing the values of str1 and strref . At stage 6, only the value of str2 is changed, so everything else remains the same. What are you not understanding?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh,
Thanks a lot,
Eyal
|
|
|
|
|
Well, you know, roughly speaking, a reference is a sugar-added-pointer, so let's write your code again, this time using the real thing (BTW no need to say that Klingon developers don't use references, references are for sissies... )
#include <string>
using namespace std;
#include <stdio.h>
void main()
{
string str1 = "a";
string str2 = "b";
string * const pstr = &str1;
printf("\ncase 0\n str1: %s", str1.c_str());
printf("\n str2: %s", str2.c_str());
printf("\n refstr: %s\n ", (*pstr).c_str());
str1 = "aa";
printf("\n case 1\n str1: %s", str1.c_str());
printf("\n str2: %s", str2.c_str());
printf("\n refstr: %s\n ", (*pstr).c_str());
(*pstr) = str2;
printf("\n case 2\n str1: %s", str1.c_str());
printf("\n str2: %s", str2.c_str());
printf("\n refstr: %s\n ", (*pstr).c_str());
str2 = "bb";
printf("\n case 3\n str1: %s", str1.c_str());
printf("\n str2: %s", str2.c_str());
printf("\n refstr: %s\n ", (*pstr).c_str());
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini,
Thanks a lot,
Eyal
|
|
|
|
|
I am wondering if I can use a VC6 program to remote control another windows application runing on the same XP desktop ?
ie Can a VC6 program send messages to another windows application to perform actions on it that the user would normaly do with the keyboard and mouse. Essential the analogy is that of pipeing input into a command line program from another source, eg a file.
Perhaps there is a windows application that will already do this without me needing to write one ?
Neil
|
|
|
|
|
Yes, this can be done. You can write your own or look into automated testing frameworks that do this kind of thing. They usually allow you to write a test script that specifies all mouse and keyboard actions that are sent to the target window.
|
|
|
|
|
hi,
I am using visual studio 2008, I wrote a dialog based application, now I want add skins to my dialog. Please give me the approach or give me links related to this issue.
Thanks in advance...
sampath-padamatinti
|
|
|
|
|
http://chimedu1.wikispaces.com/file/view/task.pdf/
|
|
|
|
|
sampath-padamatinti wrote: I want add skins to my dialog.
Take a look at this site[^], it contains some excellent information.
|
|
|
|
|
You can send mail to me,that I will send the DEMO to you.
koma0769@vip.qq.com
More Skin,you can open this url to find:
http://www.appface.com
|
|
|
|
|
If you're using VS 2008, you could download and install the MFC Feature pack for Visual C++ 2008[^]. The MFC library has been enhanced to support feature rich UI with office ribbon control, and other funky stuff. I've not used that much, but there are some sample projects that can be downloaded from MSDN.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
The file format is defined as followed:
• Every line contains one point
• The point definition contains x, y and z coordinates delimited by a space character
• Each line is ended by the new line character
Please note that only “visible” points from top view must be written to the file (the skin of the point cloud from top view) (Illustration 4).
Given:
1. Point class for the definition of a point in 3d and (some) methods for vector algebra
2. Strictly use of STL and C++ stream library
3. Visual C++ 6.0 or .NET as a development environment
4. High level test function to test the resulting component. This defines also the “interface” of the component to be written.
Hints:
- Create a small documentation 1 page with 2 pictures to present the mathematical approach of the sphere move point intersection. It should clearly communicate the mathematical approach and how the “mathematical” code is generated from that
- Use of vector algebra (dot product, cross product etc.) is highly recommended. The use of sin and cos functions is not desired.
Calculation speed is important but secondary in comparison to a good object oriented approach. E.g. a sphere, linear move of a sphere, point writer etc. should be modeled as classes. Try to use many of compact classes instead of large classes and large functions.
- Comments in the source code are welcomed. Please use “good” names for classes and functions.
- Move of a sphere between f (t) and f (t Δt) can be assumed as a linear move of the center of the sphere.
|
|
|
|
|
Is this a question or a request for someone to write your program for you? If the latter than you are in the wong place; try RentaCoder[^].
|
|
|
|
|
I have an idle time monitoring class that works great but it will not process any messages when the application is minimized....Any ideas on how to monitore idle time on minnized apps?
Daniel
|
|
|
|
|
Hi Daniel,
You can have your hook procedure in a hidden window that is not in the minimized state. However... why can't you just call the GetLastInputInfo Function[^] to determine the users idle time?
Best Wishes,
-David Delaune
|
|
|
|
|