Flash初哥

February 1, 2010

error: ctime: No such file or directory

Filed under: C/C++ — Tags: , — KAV @ 8:16 am

Today I do my csis0234 homework and find the following error:

error: ctime: No such file or directory
error: cstdlib: No such file or directory

anything wrong?

Answer:
Those are the C++ versions. Don’t use those in a C program. The C versions are
Code:

#include
#include

[C/C++] char array

Filed under: C/C++ — Tags: , — KAV @ 7:55 am

You can create a char array as follow:
char myStr[] = “text”;
char* myStr = “text”;

[C]Socket Programming with UDP

Filed under: C/C++ — Tags: , , — KAV @ 7:27 am

UDP Socket Programming – Using C language

* UDP server : simple UDP server that prints received messages.
source : udpServer.c
usage : ./udpServer
* UDP client : simple UDP client that sends data to server.
source : udpClient.c
usage : ./udpClient server data1 … dataN

To compile :

* linux : gcc -Wall -o foo foo.c
* solaris : gcc -Wall -o foo foo.c -lsocket -lnsl
(more…)

[C++]UDP programming : Operation not supported

Filed under: C/C++ — Tags: , , , — KAV @ 5:06 am

You can’t “Listen” on UDP sockets, only TCP, since UDP is a connectionless protocol – it’s a message-passing protocol. If you drop the “Listen” parameter to the new(), you’ll find that you’ll be able to create the socket. You’ll then want to call $sock->recv() (with the appropriate arguments), which will block until you receive a message…

January 20, 2010

XNA solution to “missing assets”

Filed under: C#,XNA — Tags: , — KAV @ 11:49 pm

If you got the “missing assets” error in your XNA project

Looks like you’re forgetting to mve your textures. In XNA you must keep your textures relative to your models.

For example, if my model was C:\Models\Foo.fbx and my texture was C:\Models\Textures\Bar.bmp, I must move not only Foo.fbx but Textures\Bar.bmp to my Content folder.

November 28, 2009

C++中vector类型简介

Filed under: 網上收隼 — Tags: , — KAV @ 11:04 am

from : http://blog.163.com/cc_bei_jing/blog/static/77154120200941195933481/


标准库Vector类型

使用需要的头文件:

#include 

Vector:Vector 是一个类模板。不是一种数据类型。 Vector是一种数据类型。

  (more...)

Powered by WordPress