Original Post
i am getting these errors:
Compiling...
DD.cpp
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(28) : error C2501: ''memset'' : missing storage-class or type specifiers
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(28) : error C2373: ''memset'' : redefinition; different type modifiers
c:\program files\microsoft visual studio\vc98\include\string.h(103) : see declaration of ''memset''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(28) : error C2078: too many initializers
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(31) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(31) : error C2501: ''ddsd'' : missing storage-class or type specifiers
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(31) : error C2371: ''ddsd'' : redefinition; different basic types
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(22) : see declaration of ''ddsd''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(31) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(32) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(32) : error C2501: ''ddsd'' : missing storage-class or type specifiers
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(32) : error C2371: ''ddsd'' : redefinition; different basic types
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(22) : see declaration of ''ddsd''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(32) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(33) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(33) : error C2501: ''ddsd'' : missing storage-class or type specifiers
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(33) : error C2371: ''ddsd'' : redefinition; different basic types
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(22) : see declaration of ''ddsd''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(33) : error C2143: syntax error : missing '';'' before ''.''
C:\WINDOWS\Desktop\C++ Folder\General Windows\DD\DD.cpp(188) : warning C4508: ''CreateDirectDrawSurface'' : function should return a value; ''void'' return type assumed
Error executing cl.exe.
DD.exe - 15 error(s), 1 warning(s)
and this is where aree therros seem to be:
// Include Files
#include <windows.h>
#include <string.h>
#include <ddraw.h>
#include <ddrawex.h>
//Clearing Memory
memset(&ddsd,0,sizeof(ddsd));
//CreateDirectDrawDesc
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
can someone please help me