|
Thank you,but i really mean that it will draw something in a
"console window"(like command promt window)...
|
|
|
|
|
In the old DOS days, most "graphics" was drawn using the semi-graphic characters in the normal character set.
The semi-graphic characters has "ASCII" values in the interval 0xB0 to 0xDF.
In addition, there is (was) the possibility to set foreground and background colors.
Is this what you are looking for?
|
|
|
|
|
I want to do more things than set foreground and background colors!
But,thank you!(^-^)
|
|
|
|
|
Hi,
can anyone please help me out in understanding COPY CONSTRUCTOR..please clarify me on the following questions..
1. What a COPY CONSTRUCTOR actually does and when it is used..
2. Please let me know as when we go about writing our own COPY CONSTRUCTORS(though system provides one by default)..
3. What a assigment operator does and in what way is it different from COPY CONSTRUCTOR..
if there are any interesting materials on these topics do let me know as I am getting much confused on the usage of these concepts..
Thanks In Advance
|
|
|
|
|
Check this link
http://www.fredosaurus.com/notes-cpp/oop-condestructors/copyconstructors.html
SaRath
|
|
|
|
|
Subramaniam wrote:
1. What a COPY CONSTRUCTOR actually does and when it is used..
It is used to copy the contents of the Existing object to new born object
Subramaniam wrote: 2. Please let me know as when we go about writing our own COPY CONSTRUCTORS(though system provides one by default)..
When you want to give the limited access to your object's from copy
for e.g
by making it private only member functions can access and public access denied
Subramaniam wrote: 3. What a assigment operator does and in what way is it different from COPY CONSTRUCTOR..
Assignment operator initialises the existing object by another existing object
Copy constructer initialises the new born object by existing object
for e.g
CDemo d2;
CDemo d=d2; //copy constructer
CDemo d1(d2); //copy constructer
CDemo d3;
d3=d2; //Assignment operator
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hei Laxman r u giving Interview or what...
Hahaha
Anuj Kamthan
Software Developer
|
|
|
|
|
Jax_qqq wrote: Hei Laxman r u giving Interview or what...
No, i am learning C++ with CP.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Jax_qqq wrote: Hei Laxman r u giving Interview or wha
Hope so!... humm.. i am waiting for your answer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks.
can you be more elaborate on the following comments given by you..
"When you want to give the limited access to your object's from copy
for e.g
by making it private only member functions can access and public access denied"
Thanks
|
|
|
|
|
Subramaniam wrote: "When you want to give the limited access to your object's from copy
for e.g
by making it private only member functions can access and public access denied"
See the following example
class CDemo
{
int i;
CDemo(CDemo &b)
{
i=b.i;
};
public:
CDemo& operator=(const CDemo &b)
{
this->i=b.i;
return *this;
};
CDemo(){};
CDemo test()
{
return *this;
}
};
int main(int argc, char* argv[])
{
CDemo c;
c=c.test();
CDemo c1(c);
CDemo c2=c;
return 0;
} With this we can prevent public from making copy of the objects only class members are allowed to make such coping
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
SOCKET SoAccept=WSASocket(AF_INET,SOCK_STREAM,0,NULL,0,WSA_FLAG_OVERLAPPED);
//In working thread, at the end of processing for completion of AcceptEx
setsockopt(pPerIOData->m_Socket,SOL_SOCKET,SO_UPDATE_ACCEPT_CONTEXT,(char*)(&SoListen), sizeof(SoListen))
...
WSARecv (pPerIOData1>m_Socket,pPerIOData1>m_pBuf,1,&Recved,&Flags,pPerIOData1,NULL);
...
Here the WSARecv will return 0, and reveived data is valid, but I think it should only post a requestion to the IOCP here, and the data will be received after an GetQueuedCompletionStatus, who tell me what's wrong?
btw: AcceptEx works asynchronously as expected.
|
|
|
|
|
I don't think anything is wrong.
You can use the fact that WSARecv returned 0 to optimize some code, but a completion packet should also have been queued to the IOCP, so GetQueuedCompletionStatus should also return it.
You generally only care if the return from WSASend/WSARecv if != 0, and then only if WSAGetLastError returns != WSA_IO_PENDING.
...cmk
Save the whales - collect the whole set
-- modified at 17:48 Monday 22nd May, 2006
|
|
|
|
|
At the completion of AcceptEx, I called WSARecv, it return 0, and data can be got immediately, nothing wrong. Then until WSARecv return SOCKET_ERROR I put another WSARecv, ensure that WSAGetLastError()==WSA_IO_PENDING. But it can't receive data from the client any more, why?
|
|
|
|
|
I'v not seen any document that says WSARecv can return 0 in IOCP model.
I'm not sure however.
-- modified at 22:17 Tuesday 23rd May, 2006
|
|
|
|
|
followait wrote: I'v not seen any document that says WSARecv can return 0 in IOCP model.
It says so right in the MSDN docs for WSARecv.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi,
I have few questions.
i have read some articles on https+vc++ in code project. Thanks to the guys for articles.
1. If i need to do a https request(ssl+client crtification) to a server which is the library i need to use for VC++ dll(not a desktop application).
winInet or WinHttp
2. what are the sequence of operations(API methods) to send the https request.
3. i have client certificate, and i want to select this particular client certificate with the https request.
thanks
|
|
|
|
|
i am able to makes a https connection using wininet,
but how can i handle the response.
i am using the InternetReadFile after the request is sent.
This method reads the contents of the file, but i want a API method which responds only the output of the object file(my case it is servlet).
thanks
|
|
|
|
|
|
Hi,
I get the list of file name with full path as the output in the list box.
when the user double clicks on the list box item i want the file to be opened i have used the below code but it has no effect, its not opening the file. can u please tell me what will be the error.
void CSearchDlg::OnDblclkSout() <br />
{<br />
<br />
int d;<br />
d=m_SOUT.GetCurSel();<br />
CString FName;<br />
m_SOUT.GetText(d,FName); <br />
ShellExecute(m_hWnd, "open", FName, NULL, NULL, SW_SHOWNORMAL); <br />
<br />
<br />
}
Regards,
Vinay Charan.
|
|
|
|
|
vinaycool wrote: m_SOUT.GetText(d,FName);
ShellExecute(m_hWnd, "open", FName, NULL, NULL, SW_SHOWNORMAL);
Is FName the full path to the file?
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hi Nibu thomas,
List box contains a data like
C:\dir\filename.ext
i used the F5 and checked the value of FName i am getting Error symbol "FName" not found.
Is the code correct to get the value of the selected item from the list box ??
|
|
|
|
|
Vinay wrote: List box contains a data like
C:\dir\filename.ext
The Fname should be in the format of '\\' instead of '\'
for e.g
C:\\path\\filename.extension instead of C:\path\filename.extension
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi Laxman,
I cant change the file path,because the items in the list box contains a data like
D:\folder\folder\00000301\0123.txt
Can u please tell me how to open the file ???
|
|
|
|
|
Vinay wrote: Hi Laxman,
I cant change the file path,because the items in the list box contains a data like
D:\Parichay\Box01\00000301\0123.txt
Can u please tell me how to open the file ???
void CSearchDlg::OnDblclkSout()
{
int d;
d=m_SOUT.GetCurSel();
CString FName;
m_SOUT.GetText(d,FName);
modify the FName path here as above post
ShellExecute(m_hWnd, "open", FName, NULL, NULL, SW_SHOWNORMAL);
}
Knock out 't' from can't,
You can if you think you can
|
|
|
|