Showing posts with label win. Show all posts
Showing posts with label win. Show all posts

Thursday, July 19, 2012

Vs crash, template function virtual


In debug mode, VS 2010,

#include <iostream>
using namespace std;
template<typename T,void (T::*m)(int)>
    struct B{

    void f(T* a,int x){
        (a->*m)(x);
    }
};



struct A{


   virtual void v(int){}
   B<A,&v> b;


};


int main(){
   A a;
 
}

This code crashes. Remove the virtual, it will compile

Wednesday, July 18, 2012

template function used as non typename template parameter

In vs


template<typename T,void (T::*m)(int)>
struct B{
void f(T* a,int x){
(a->*m)(x);
}
};


struct A{


   template<typename X> void f(int){
  }

   void wrap(int i){
     f<char>(i);
   }

   B<A,&A::wrap > x;
   B<A,&A::f<char> > y;
};


int main(){
   A a;
}

====compiler output====

c:\users\fabio\dropbox\vs\testbug\testbug.cpp(20): error C2440: 'specialization' : cannot convert from 'overloaded-function' to 'void (__thiscall A::* )(int)'
          None of the functions with this name in scope match the target type


===Solution===

  B<A,&f<char> > y;

Sunday, May 6, 2012

youtube to wmv for power point


download the mp4 using the chrome plugin
( video.online-convert.com youtube source has worse quality)

virtual dub does not open flv or mp4:
 install Virtualdub FFMpeg Input Plugin

 http://sourceforge.net/projects/virtualdubffmpeginputplugin/
OR
use  http://video.online-convert.com/convert-to-avi (select avi - XVID as output because direct conversion to wmv cannot be imported in powerpoint)


use virtualdub (tested with 1.9.11) with
ffdshow_rev3572_20100913_clsid : this is the last version that has the encoders
if you get error code -100 use wmv9 (and not 7 or 8)


source:
http://thesunstroke.blogspot.jp/2014/06/how-to-make-virtualdub-openedit-mkv-mp4.html

Monday, March 12, 2012

create win7 bootable cd

windows 7 bootable cd from files:

1)uncompress the files
2)download oscdimg http://www.sevenforums.com/attachments/general-discussion/32382d1256189124-make-bootable-iso-student-d-l-oscdimg.zip
3)     oscdimg.exe -u2 -bY:\pathToFilesRoot\boot\etfsboot.com -h Y:\pathToFilesRoot Win7.iso

(details http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/how-to-install-windows-7-fully-paid-for/4748f797-0d88-4fde-90d9-3754a0801dea )

Friday, February 24, 2012

Windows XP on VMware

When installing windows XP be sure to use IDE hard disks and not SCSI hard disks. VMware uses LSI drivers