winapi - returning a buffer in c -


i have couple of questions.
need write program(winapi) create buffer of fixed size, append strings , returns it.
1. possible "main" return buffer? 2. how should create, append string , return it?

not new c, have little experience buffers , strings handling.
thank you!

  1. is possible "main" return buffer?

no , shouldn't. what should main() return in c , c++?

  1. how should create, append string , return it?
char astring[fixed_size]; memset(astring, 0, sizeof astring); strcpy(astring, "this string"); 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -