|
don't worry i find out how.
Click here if u are interested.
/\|-||\/|/\|)
|
|
|
|
|
You have to validate every modification in the control by processing all the EN_CHANGE messages on the CEdit.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
hi,
my name is aditya. i am new to vc++. i am trying to create a ftp application. what i want to know is when we connect to a ftp site. there are many directories on the site(apart from the files). so how can i see the contents of the directories or download the whole directory present there.
aditya
|
|
|
|
|
From the RFC[^]:
LIST (LIST)
This command causes a list to be sent from the server to the
passive DTP. If the pathname specifies a directory or other
group of files, the server should transfer a list of files
in the specified directory. If the pathname specifies a
file then the server should send current information on the
file. A null argument implies the user's current working or
default directory. RFCs are good. Use them!
--
An eye for an eye will only make the world blind.
|
|
|
|
|
I used vc++6.0 to buid the windows DiretShow simple code playcap and got the link error 2001.
How to settle this problem?
Thanks!
momer
|
|
|
|
|
what does the linker say ??????
it doesn't find _main ...
what does that mean ???
you must have a main() function in your code, which is the entry point of your program...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi!Dear toxcct,
It says:LIBCD.lib(crt0.obj):error LNK2001:unresolved external sybol _main.
Yes,I know I must have a WinMain() function in my C++ code.
Now I have killed this problem by setting the project option subsystem:windows, but not subsystem:console,couse I used the MFC in my code.
Thank you very much!
Best Regards!
|
|
|
|
|
How to Spilit the Status Bar in a Horizontal Fashion......?
or to change the position of the text displyed in the status bar
ditty grail
|
|
|
|
|
What create static\dynamic library and use them in vc++?
Would you list a example?
thanks!
|
|
|
|
|
sorry, but to get an answer that is what you're looking for, you should first formulate your question correctly (personnaly, i don't understand at all)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I don't understand what you mean
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
I now doing a project that I don't know how to start. I need to know how the
TCP work and write a program to send data from a PC to another PC using visual c++. After knowing how the TCP work, I need to write a program to send and receive message from Host PC to PLC follow the MODBUS format. Can help me....
|
|
|
|
|
|
I just go through the CAsyncSocket and I start program a little but got some error that I don't understand,can help me.....
Below is my code:
#include "iostream.h"
#include "afxsock.h"
BOOL Create(
UINT nSocketPort = 0,
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL
);
when I compile, it show the error below:
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/TEST.exe : fatal error LNK1120: 1 unresolved externals
|
|
|
|
|
looking at the linker error, your program don't have any main() function...
where did you put the code so ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I very weak in programming and never learn visual c++ before...
What you mean by main() function. So, I cannot start a program without main() functon?
|
|
|
|
|
Tsaejen wrote:
What you mean by main() function. So, I cannot start a program without main() functon?
exactly, that's it....
actually, when a C/C++ program starts, the runtime looks for the main() function...
so, the program must be put into main() (at least, the beginning)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
You must learn the basics of C++ before you can start working on TCP/IP in C++. If you even don't know what main() is, you can forget TCP and sockets for a long time.
|
|
|
|
|
#include "iostream.h"
#include "afxsock.h"
#include "stdlib.h"
main()
{
return 0;
};
////////////////////////////////////////////////////////////////////////////////////////
// Create a socket
BOOL Create(
UINT nSocketPort = 0,
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL
);
////////////////////////////////////////////////////////////////////////////////////////
// Client socket Connect function
BOOL Connect(
LPCTSTR lpszHostAddress,
UINT nHostPort
);
BOOL Connect(
const SOCKADDR* lpSockAddr,
int nSockAddrLen
);
////////////////////////////////////////////////////////////////////////////////////////
// Server socket listen function
BOOL Listen(
int nConnectionBacklog = 5
);
////////////////////////////////////////////////////////////////////////////////////////
// Server socket Accept function
virtual BOOL Accept(
CAsyncSocket& rConnectedSocket,
SOCKADDR* lpSockAddr = NULL,
int* lpSockAddrLen = NULL
);
My code is above but still have error, help.....
error C2575: 'Accept' : only member functions and bases can be virtual
|
|
|
|
|
i think you should first learn for C/C++.
secondly, what are you trying to do with that code ?
your code above is not correct :
#include "iostream.h"
#include "afxsock.h"
#include "stdlib.h"
main()
{
return 0;
};
1) you declare main() without any returning type.
2) the ending ; is not correct there
3) the header files are standard headers, so they shouldn't be between "" but <> instead. Moreover, afx includes should be the first files to be includes
4) the program enters main, then execute the first instruction it finds (here return 0 ), which tells it to exit the function (so, also exiting the program, as main can be seen as the program at your level).
revise it this way :
#include <afxsock.h>
#include <iostream.h>
#include <stdlib.h>
void main(void) {
}
ok, then, what do you want to do with the following functions ?
it seems that you just copied/pasted some code you found in the doc into your source...
DON'T !!
these functions are already coded (and i doubt you could rewrite them by yourself seeing your advanced knowledge on the language).
just use them as the MSDN tells you to (right number of parameter, and matching types). also be careful of the case (C/C++ are case sensitive).
well now, give me a better piece of code in consequence and i'll try to help you more.
see you,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
I was given a sch project and I have a deadline to complete the project. But now I stil don't know how to start the programming part. I also very weak in programming and never study visual c++ before. Very STRESS!!!!
The project is about MODBUSTCP PROTOCOL. I need to create a Dialog that can send data to PLC. I already created a Dialog that contains edit box to enter Destination IP Address, 2 radio button to choose MODBUS or MEWTOCOL, edit box to type message and send the message, and also a group box include some button which label door open that when I click on the button, it will send a message tell the PLC to open the dooor.
And now I don't know how to write the program that when I type a message and send to another Destination(IP Address).
|
|
|
|
|
I think you are in trouble
If anybody in this forum could help you'd have to be more concrete and send the different pieces of code that didn't work.
Do you use a wrapper class or you have to build at your own?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
What is wrapper class?
My lecturer want me to use console application to try to do my testing on sending message first, and tell me to understand how TCP work then I will know how to do the MODBUS part....but I still not very understand the TCP work......
|
|
|
|
|
Tsaejen wrote:
What is wrapper class?
It provides an easy/summarized way (sometimes extends) to use a class and some of its methods.
Tsaejen wrote:
....but I still not very understand the TCP work......
Read CAsyncSockets[^]
and take a look to Client[^] and server[^] samples.
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|