|
Hi there,
I am trying to develop socket client-server application in c++ using command promp, but i could not develop it in a good way. Is there any1 who already developed it?? If yes then plz tell me abt it.
Waiting 4 reply, Thank u.
|
|
|
|
|
hiral_shah wrote: but i could not develop it in a good way
What seems to be the problem? The server/client part and the way users use it are not neccesarely related (the sockets part is the same for a console app or for a Windowed GUI app)
|
|
|
|
|
I have developed in MFC but I want it in C, but i do not have tc compiler for 64 bit amd processor, i have tried to search compiler but i could not. and 32 bit is useless for me. If you have any link for this 64 bit tc compiler then give me that. Now tell me what should i do???
|
|
|
|
|
Im working in C++ Win32 Console with MFC support, and i want the cout part to go the opposite direction. Lets say i did:
cout << "1"endl;
cout << "2"endl;
cout << "3"endl;
and then build without debug it would show
1
2
3
Press any key to contine...
But i want it to append new lines backwards, so it would become
Press any key to contine...
3
2
1
Is this possible? if so how?
//Johannes
|
|
|
|
|
Johpoke wrote: But i want it to append new lines backwards, so it would become
can u show the code?
nave
|
|
|
|
|
Well currently there is no code, as im only going to try to program it if i know i can make console go backwards, basicly im only going to be using cout, to try to create a matrix text rain effect...
/Johannes
|
|
|
|
|
some time the WriteConsoleOutput() will help u..
nave
|
|
|
|
|
create a handle to STDIN and use it as if it were a file...
Or you could use a buffer and after you've finished building up the output strings, just print them in the reverse order
|
|
|
|
|
Hi all
I am getting problem while using InternetOpenURL in Wndoe service. It fails. But if the same code I try through a seaparte EXE it works. and It happens only on XP.
"A winner is not one who never fails...but the one who never quits"
|
|
|
|
|
Ganesh_T wrote: I am getting problem while using InternetOpenURL in Wndoe service.
To determine why access to the service was denied you can use InternetGetLastResponseInfo()or you can also use GetLastError() to retrieve a specific error message.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See the Return Values section here.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It's just a warning, but i wonder why it even pops up ? According to teh Documentation, size_t is unsigned int. So why does my compiler warn me every time want them implicitly casted ? They are the same, or aren't they ?
|
|
|
|
|
Mr.Brainley wrote: It's just a warning, but i wonder why it even pops up ? According to teh Documentation, size_t is unsigned int. So why does my compiler warn me every time want them implicitly casted ? They are the same, or aren't they ?
Use sizeof to find the size of the size_t variable, is it 8 bytes or 4 bytes?
|
|
|
|
|
insn't size_t an __int64 instead ?
|
|
|
|
|
toxcct wrote: insn't size_t an __int64 instead ?
No it's traditionally typedef'ed as UINT. But I have seen in some headers it being typedef'ed as __int64.
|
|
|
|
|
Well, since my usually strings are not longer than 256, i just use an explicit cast to supress the warning. It's probably best like that, since that apparently would change with the SDK-Version one uses. Thanks for your replies.
|
|
|
|
|
CrtDefs.h:
#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef unsigned __int64 size_t;
#else
typedef _W64 unsigned int size_t;
#endif
#define _SIZE_T_DEFINED
#endif
...cmk
Save the whales - collect the whole set
|
|
|
|
|
hey you guys,
the problem is that i have 2 classes (say A,B) ,
class A have a pointer on class B
<br />
class A<br />
{ B* b;};<br />
and class B have a member variable for type class A
<br />
class B<br />
{A a;};<br />
this is seems to be a problem and the compiler retrun an error say
'a' uses undefined class 'A' although i am declaring the header of A
<br />
#include "A.h"<br />
class B<br />
{A a;};<br />
anybody have any idea abt wat might be the problem here
thnx 4 ur time and concern
learn, learn, and learn
|
|
|
|
|
singersinger wrote: this is seems to be a problem and the compiler retrun an error say
'a' uses undefined class 'A' although i am declaring the header of A
Mr Compiler is right.
You need to forward declare class B, which tells the compiler that there is a class called B, and he needn't worry about it.
class B;
class A
{ B* b;};
class B
{A a;};
|
|
|
|
|
Your problem is that a is not defined yet, as the compiler correctly says.
The first thing it does when compiling A is go to B and compile that, and thus it does not know that class A exists yet.
THe solution to this is to add the prototype to A before including B.
e.g.
<br />
class A;<br />
<br />
#inlcude "B.h"<br />
<br />
class A<br />
{ B* b;};<br />
<br />
|
|
|
|
|
wheelerbarry wrote:
class A;
#inlcude "B.h"
class A
{ B* b;};
with this, you will have include problems.
in B.h you will need to have include guards
#ifndef _B_H_
#define _B_H_
class B
{
};
#endif
and in A.h it is good practice ( IMO, YMMV ) to also add include guards :
#ifndef _A_H_
#define _A_H_
#ifndef _B_H_
#include "b.h"
#endif
class A
{
B* b;
};
#endif
IMO, using forward declaration is the best approach to that problem unless B is not a pointer.
|
|
|
|
|
guys, thnx alot 4 ur fast reply
but still this doesn't solve the problem, i don't know why
---------------------
learn, learn, and learn
|
|
|
|
|
#pragma once
class B;
#include "B.h"
class A
{
B* b;
};
#pragma once
#include "A.h"
class B
{
A a;
};
#include "B.h"
void main( void )
{
B bb;
}
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have applied a skin to window by scanning a bitmap and creating a HRGN from it. I then call SetDIBitsToDevice() to draw the image. All works fine except for when the window is moved. There is an unsightly black flicker around the edges of the bitmap, they are only there when the window is being moved, almost as if the image is being drawn to the wrong place.
I have little experience with bitmaps and the gdi, I wonder if anybody could point out a possible cause for this.
|
|
|
|
|
waldermort wrote: There is an unsightly black flicker around the edges of the bitmap, they are only there when the window is being moved, almost as if the image is being drawn to the wrong place.
You might be drawing slightly outside the window. I am not sure though. I did have a similar kind of problem some time back.
|
|
|
|