|
sharanu wrote: I want use progress bar using command line programming...plz help me...
What ? I think you have to be a lot more clear in order to receive some help. How does command line programming relate to progress bar ??
|
|
|
|
|
I am writing a command line program. where i check for server connection.Till it checks for the server connection i want to use progress status...
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
And, what's the problem, where are you stuck exactly ?
And BTW, what is a command line program ? You mean a console program ?
Because there's no such thing as a command line program. There is a 'command line' which is a string that you can pass to your program when you start it. So basically, every program is a 'command line program' because all of them can accept command lines (even if they don't use it).
|
|
|
|
|
I think u want to display progress of the task in the console window,
u need to make use of control codes (backspace, ...) and graphic characters if necessary to update bar like appearance. say, if you want to display percent of completion, print the number and clear the number using backspace escape sequence and print the updated value. U can also go the graphic mode (making use of C graphics)
I also suggest u that move your biodata from signature to the member settings, than if some body wants to view they will go and see your profile.
|
|
|
|
|
Can i hve some example to do...
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
here is a simple example,
for (int i = 0; i < = 100; i++)
{
printf ("%d percent", i);
Sleep(10)
printf ("\r"); // carriage return, goes back to beginning of line
}
|
|
|
|
|
Thank u
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
yes its a console application
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
I guess you want to make a "console application" ...
Maxwell Chen
|
|
|
|
|
yes sir
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
Hi all,
I want to place a rich edit control on a dialog.
So when i place a Rich edit control on the dialog, and run in debug mode, dialog is not displaying with so many error "*.dll matching not found warning"...
Manjunath S
|
|
|
|
|
Read the 'Important' note at the top of this page[^].
Manjunath S wrote: with so many error "*.dll matching not found warning"...
These are warnings, not errors and you can perfectly ignore them.
|
|
|
|
|
Hi,
I called AfxInitRichEdit() in the OnInitDialog(), But problem continues...
Manjunath S
GESL
Bangalore
|
|
|
|
|
Thanks I got it...
Manjunath S
GESL
Bangalore
|
|
|
|
|
Hi, this maybe a stupid question. But I'm new to C++
I would like to create a bitmap, and put data from by myself
i.e. I have to process a set of pixel data from data buffer, after the calculation, I would like to save the data into a Bitmap. maybe line by line, maybe append from a loop.
Can anyone provide me an example for saving and creating bitmap?
many Thanks..
|
|
|
|
|
|
Would you mind provide me a sample code for creating a bitmap.
I've read some doc, it needs to create Bitmap header as well...
actually, the raw data (image from char* ) must eventually save into Png file, so I want to save it to Bitmap first, and then convert to png.
modified on Monday, February 04, 2008 9:01:59 PM
|
|
|
|
|
Hello everyone,
1.
Suppose I have code like this. According to the standard, the storage of exception object is undefined (could be either on stack or on heap?).
2.
I am wondering what is the life cycle of the exception object which reference variable e binded to? For example, could we bind a global reference to the exception object referred by e? Or doing something on the exception object beyond the bracket?
3.
The life cycle of variable e itself should not beyond the bracket, right?
catch (exception& e)
{
}
thanks in advance,
George
|
|
|
|
|
George_George wrote: code like this.
Not sure if some text is missing in your post??
George_George wrote: what is the life cycle of the exception object which reference variable e binded to?
You can try this with the debugger to see what address you catch!
std::exception e;
void Test()
{
try {
throw std::exception();
}
catch(std::exception& e) {
__asm int 3
}
}
Maxwell Chen
|
|
|
|
|
Hi Maxwell,
1.
Maxwell Chen wrote: Not sure if some text is missing in your post??
I posted below in my question. Just the simple catch bracket, have found it?
2. What does int 3 mean?
3.
Your sample code looks confusing since you use both variable e (the same variable name for local catch block and the global variable).
My question is, is it ok to pass e outside of the catch bracket, like assigning it to some global varible? In the catch block, local e is binded to the exception object by thrown statement, I am not sure whether it is safe to bind this object outside, e.g. to some global object.
regards,
George
|
|
|
|
|
George_George wrote: I posted below in my question. Just the simple catch bracket, have found it?
Ok. I though (1) had its own code snippet and (3) had another.
George_George wrote: What does int 3 mean?
A breakpoint in ASM.
George_George wrote: 3.
Yes. See below.
You will see that p holds the same address as v .
int* p = NULL;
void SetN(int& r)
{
p = &r;
}
void Test()
{
try {
throw 5;
}
catch(int& v) {
SetN(v);
}
}
Maxwell Chen
|
|
|
|
|
Hi Maxwell,
You doing the assignment work inside the catch block, do you think it is still safe to refer to global variable p after function Test returns?
regards,
George
|
|
|
|
|
George_George wrote: do you think it is still safe to refer to global variable p after function Test returns?
It will crash if changing my previous sample from int type to user defined type (class ). As:
class MyClass
{
public:
int a;
~MyClass() {
printf("~MyClass \n");
}
};
MyClass* p = NULL;
void SetN(MyClass& r)
{
p = &r;
}
void Test()
{
try {
MyClass m;
throw m;
}
catch(MyClass& v) {
SetN(v);
}
}
void main()
{
Test();
(*p).a;
}
Maxwell Chen
|
|
|
|
|
Thanks Maxwell,
Looks like you proved that it is not safe to access the exception object outside of the catch block? Right?
regards,
George
|
|
|
|
|
George_George wrote: Looks like you proved that it is not safe to access the exception object outside of the catch block? Right?
It depends. If you change my code into the below way, it lives.
void Test()
{
try {
MyClass* p = new MyClass();
p->a = 3;
throw *p;
}
catch(MyClass& v) {
SetN(v);
}
}
void main()
{
Test();
p->a;
}
Maxwell Chen
|
|
|
|