Do you mean Matlab ?
carrivick
Posts
-
C++ to mathlab -
OpenRAID challenge - little off topicCould you use a Virtual Machine to achieve this. The type of disks and their location can be divorced from the underlying hardware e.g. you can create a scsi which actually resides on external firewire drive.
-
Help out with compiler error C2327If you are using nested class then consider using 'friend' to control acess to members of the other classes. But you will still need a pointer/reference to access the in the first place.
-
Basic issue i got confused helpmonsieur_jj wrote:
pRetVal = reinterpret_cast(prop.first.lpszW);
This is the line which is in error. Because you are performing a reinterpret_cast it will copy the pointer value but not correctly create the rest of the BSTR class, notably the length which occurs before the string array. My solution would be to change the return type to the WIDE CHAR type the same as lpszW.
-
WinMain and argv/argcYou need to use GetCommandLine and CommandLineToArgvW like
#include #include #include int __cdecl main() { LPWSTR *szArglist; int nArgs; int i; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); if( NULL == szArglist ) { wprintf(L"CommandLineToArgvW failed\n"); return 0; } else for( i=0; i
-
Funny timing results in threading projectMaybe overwritting your stack at some point ? Put some Sleep calls to make the execution times longer see if they follow the time you set
-
need to give the number of middleLook more closely
void main() { int n=0,k,m,j; **//n is Zero so you declare an array of zero size !** int*p=new int[n]; **// To late you update the value of n** cin>>n; k=n; j=n; m=n; for(;n>0;n--) { cin>>p[n-1]; } int x=1; while(x) { x=0; for(;k>0;k--) { **// This syntax is just wrong try to understand rather than just getting it to compile** if(p[k-1] { swap(p[k-1],p[k]); x=1; } } } **// What if only one element is enter opps were off the end of the array** if(m%2==1){cout<get this,it is also wrong.please have
-
Problem in RegQueryValue.Do you have a unicode project setting but not viewing the string as unicode ? This would explain that you would see the first character.
-
Convert DWORD_PTR back to my objectI'm guessing you are getting cannot convert DWORD_PTR to Instrument *. Oh and allways try and use eplicit casting i.e. static_cast rather than C-Style casts. Try this Instrument *instObject = static_cast((static_cast(treeCtrl->GetItemData(hItem)))); or if not Instrument *instObject = dynamic_cast((dynamic_cast(treeCtrl->GetItemData(hItem)))); Could you copy the exact compiler error into the thread.
-
need to give the number of middleHere you go
void swap(int &a,int &b); void main() { int array_size=0,k,m,j; cin>>array_size; if(array_size < 1) return; int*p=new int[array_size]; for(int i=0;i>p[i]; } // Lets do a bubble sort bool changed = true; int bubble_end = array_size - 1; while(changed) { changed = false; for(int i=0;i p[i+1]) { swap(p[i],p[i+1]); changed = true; } } } if(array_size > 1) { if(array_size%2==1) cout< -- modified at 8:50 Saturday 15th September, 2007
-
How to prevent copying a fileUsing the mfc CFile class CString file_name = _T("C:\\AnotherFile"); CFile f; f.Open( file_name, CFile::modeRead | CFile::shareExclusive ); while(1) Sleep(1000);
-
How to remove all source code symbol names from Release buildDo you have RTTI enabled ? Do you need to have it enabled ?
-
Projectsettings for dual core cpu's?If you are using VS 2005 ensure that you have service pack 1 installed as this will generate code with better support for intel duo processors.
-
Problems about how to explore a program's action?Add debug output using OutputDebugString to record what has happened. User the Windows tool ProcessExplorer to examine File handles events etc that the exe is performing.
-
Getting hold of certain event entriesThe first error lies in the following line if ((LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD))=="Windows Agent") What you are performing is a pointer comparison with a static string. This is only going to work in two ways if the expression (LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)) is used to initialise a string class like std::string or CString etc a more straight forward way is to use a string compariosn function eg strcmp or its wide equivalent if you have a Unicode project. i.e. if(strcmnp((LPSTR)((LPBYTE) pevlr + sizeof(EVENTLOGRECORD)),"Windows Agent") == 0) The other problem you might face is user priveledge as access to a system resource like the event logs may be restricted if you are not an Admin user.
-
dynamic two dimentional arrayCheck the thread subject, In what way is this array dynamic ?
-
debugging a dll on command lineWinDbg has a symbol search path and a source search path. both of these need to be set up correctly. You can also download symbols for windows DLL's for various OS. You can also specify a debugger for any executable image which will get loaded automatically when the program executes. Very useful for debugging services. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" create a key called "debugger" with a value like "C:\Program Files\Debugging Tools for Windows\windbg.exe" -g
-
Difference between debug and release buildsSpeed is the main difference a debug build will by default have no optimisation, this makes it easier to debug. But you can debug a release build it is just a little harder.
-
Unable to connect to Named PipeWere you passing NULL in the Secutity Attributes ?
-
Modify tooltip - Mouse over file (.xml)You need a shell extension http://www.codeproject.com/shell/shellextguide1.asp[^] Look for code with with QueryInfo handler (shell version 4.71+)