Click here to Skip to main content
15,913,722 members

Comments by Magnus9998 (Top 4 by date)

Magnus9998 28-May-14 14:29pm View    
Or we could say "sizeof()" was giving me the size of the pointer, which is 4 bytes indeed, instead of the size of the array, that I had stored in imageSize. In other words, I solved the problem by using imageSize instead of sizeof(data).

Also, about your two points...

1) That's what I have been doing from the very beggining. Reading the API documentation for OpenGL. However, it has nothing to do here, since this was a C++ problem. Not an Open GL one. And no, other than the standard Windows API and Open GL, I am not using anything else.

2) Making mistakes implies learning. One is not blind-folded for doing something he doesn't know. One is blind-folded if he doesn't even try, since he will never know how to do it. Sure I did learn that sizeof() only gives you the size of the type you're using. Not the size of an array.
Magnus9998 26-Aug-13 8:19am View    
The problem is that you can't capture directly as video. Every video capture software, including professional video recording, capture still images and store them in a temporary folder, then merge them into a temporary file and, finally, merge all images and encode them into the final video file. Have in mind that a video is just that, a bunch of still images and audio merged into a single file.
Magnus9998 22-Aug-13 10:59am View    
I still keep getting errors:

"error: an anonymous struct cannot have function members"
And also
"error: abstract declarator '' used as declaration"

Both errors point to the lines 7 and 18 of my ServerClass.h header. Which means that, for some bizarre reason, it doesn't get the name of my class, but why?
Magnus9998 22-Aug-13 9:51am View    
Yeah, I had to mess so much with the code, that I ended doing stupid things without even noticing.

I modified the header


<pre lang="c++">#define DEFAULT_BUFLEN 512
#ifndef SERVERCLASS_H
#define SERVERCLASS_H
#endif

class ServerClass
{
public:
static int CreateServer(HWND);
static int CloseServer();
static char* getcbuffer();
static int listensock();
private:
static SOCKET ListenSocket;
static SOCKET ClientSocket;
static char recvbufx[DEFAULT_BUFLEN];
static int recvbuflen;
};</pre>


But I still get an error.

"error: an anonymous struct cannot have function members"

And also

"error: abstract declarator '' used as declaration"

Both errors point to the lines 7 and 18 of my ServerClass.h header.

I only want to have access to those functions from another classes.