View Single Post
Old 25th April 2005, 16:32   #9  |  Link
daveoggy
Registered User
 
Join Date: Dec 2004
Location: London
Posts: 26
My story so far:

Started working through a C++ tutorial I found on the web. Everything seemed to be progressing until I came to this program which stopped me in my tracks:

// integer increaser
#include <iostream.h>

void increase (void* data, int type)
{
switch (type)
{
case sizeof(char) : (*((char*)data))++; break;
case sizeof(short): (*((short*)data))++; break;
case sizeof(long) : (*((long*)data))++; break;
}
}

int main ()
{
char a = 5;
short b = 9;
long c = 12;
increase (&a,sizeof(a));
increase (&b,sizeof(b));
increase (&c,sizeof(c));
cout << (int) a << ", " << b << ", " << c;
return 0;
}

I don't understand what the colons are saying and there was no prior mention of their meaning.

Then I checked back here and read Trevlac's post and his suggested reading. Now from what I can understand a great deal of the code in SimpleSample is standard and just has to be there, and to alter the output only the "//--- FINALLY !!!! --------" code needs altering.

So I decided to compile SimpleSample (1.7) and look at what the un-altered code does. And now for even more embarrassment, I can't even get the filter to work! Apparently the syntax is SimpleSample(clip,[size]), so shouldn't this work:

Loadplugin("c:\av\avisynth\myplugins\SimpleSampleDbg.dll")

TheClip = AVISource("c:\someclip.avi")
SimpleSample(TheClip, 10)

I know I'm an idiot and probably on borrowed time in a forum such as this, but here's hoping.
daveoggy is offline   Reply With Quote