Search Results

Showing results 1 to 40 of 347
Search took 0.04 seconds.
Search: Posts Made By: mitrmkar
Forum: C++ 3 Days Ago
Replies: 4
Views: 241
Posted By mitrmkar
I think you are not understanding the following

Sizes of integral types

The values given below shall be replaced by constant expressions suitable for use in #if preprocessing directives. Their...
Forum: C++ 9 Days Ago
Replies: 1
Views: 220
Posted By mitrmkar
If you need to resolve the path and file name of a .lnk file (i.e. a shortcut) that's dropped on the Audacity project, you'll need to use the IShellLink interface. Read about Shell Links...
Forum: C Mar 31st, 2009
Replies: 10
Solved: minmax
Views: 713
Posted By mitrmkar
There is an initialization failure ...

for( i = 0; i < n; i++ ) numberlist[i] == rand() % n ;
Forum: C++ Mar 31st, 2009
Replies: 3
Views: 463
Posted By mitrmkar
I think the two friend declarations need template <class T>

template <class T>
class Tree
{
...
template <class T> friend void buildExprTree(Tree<T> & expr);
template <class T> friend int...
Forum: C++ Mar 28th, 2009
Replies: 11
Views: 595
Posted By mitrmkar
You can use const_cast, i.e.

Node * temp = const_cast<Node*>(this);

Maybe you could revise the 'constness' of the code (I did not look too closely). Perhaps read about Const correctness...
Forum: C++ Mar 18th, 2009
Replies: 9
Views: 551
Posted By mitrmkar
There is a contradiction, in your first post you say that "Each file has: #include "include.h"". If enum.cpp actually includes include.h, that results in the error you described.


Assuming...
Forum: C++ Mar 18th, 2009
Replies: 23
Views: 1,067
Posted By mitrmkar
Now remember the second parameter to write(), that specifies how many bytes are written.

PS. Maybe you could try to re-post your code
Forum: C++ Mar 16th, 2009
Replies: 23
Views: 1,067
Posted By mitrmkar
It seems that you are desperately trying various ways to write the file.

Maybe relax and try to master e.g. a binary .pnm file of a very small size, say 2x2 pixels hence being easily viewed in...
Forum: C++ Mar 10th, 2009
Replies: 4
Views: 595
Posted By mitrmkar
Read about When should my destructor be virtual? (http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.7)
Forum: C++ Mar 10th, 2009
Replies: 7
Views: 1,078
Posted By mitrmkar
The function prototype for ON_MESSAGE() is
afx_msg LRESULT memberFxn( WPARAM, LPARAM );


Ctry_ENTERDlg::OnBnClickedButton1 does not match, so you might add a new member function which handles...
Forum: C++ Mar 8th, 2009
Replies: 6
Views: 596
Posted By mitrmkar
If the stream object is in error state, then you also need to call clear() in order to make the object functional again. Could that be the reason in this case?
Forum: C++ Mar 8th, 2009
Replies: 3
Views: 557
Posted By mitrmkar
As soon as the map goes out of scope, its destructor takes care of destructing all the vectors, whose destructors in turn destruct all the strings. So it all happens automagically (as long as you are...
Forum: C++ Mar 6th, 2009
Replies: 8
Views: 1,159
Posted By mitrmkar
resource.h is not the place to define _WIN32_IE. Do it instead above the #includes, i.e.

#define _WIN32_IE 0x0301
#include <windows.h>
#include <commctrl.h>


Or alternatively in the...
Forum: C++ Mar 6th, 2009
Replies: 8
Views: 1,159
Posted By mitrmkar
In your project, #define _WIN32_IE to at least 0x0300.

InitCommonControlsEx() takes a pointer to a INITCOMMONCONTROLSEX struct. You are not using the function correctly ...
Forum: C++ Mar 6th, 2009
Replies: 2
Views: 239
Posted By mitrmkar
A typo has slipped in ... it should be localVariable.
Forum: C++ Mar 6th, 2009
Replies: 7
Views: 1,078
Posted By mitrmkar
Seems that I misunderstood the problem. Anyhow, the CMyEdit class' code that you have should capture the Enter key.
Maybe you don't have the following in the dialog class implementation
...
Forum: C++ Mar 6th, 2009
Replies: 7
Views: 1,078
Posted By mitrmkar
That functionality can be achieved by simply making sure that:

the first button (only) has the 'default button' -option checked
the first edit box does not have the 'want return' -option...
Forum: C++ Mar 4th, 2009
Replies: 3
Views: 572
Posted By mitrmkar
See GetExitCodeThread() (http://msdn.microsoft.com/en-us/library/ms683190(VS.85).aspx)
Forum: C++ Mar 3rd, 2009
Replies: 2
Views: 772
Posted By mitrmkar
Don't allocate using the operator new, use _aligned_malloc() instead to have the data properly aligned.
Forum: C Mar 3rd, 2009
Replies: 6
Views: 459
Posted By mitrmkar
Try going through the py2exe tutorial (http://www.py2exe.org/index.cgi/Tutorial).


If you'll use py2exe to assemble all the files your python prog needs, you can skip the idea of coding anykind...
Forum: C++ Mar 3rd, 2009
Replies: 5
Views: 453
Posted By mitrmkar
One approach would be to

generate a default MFC-based add-in


study it so that you understand how things work


strip off all MFC/AFX -based stuff, converting the add-in to a standard DLL...
Forum: C++ Feb 27th, 2009
Replies: 4
Views: 706
Posted By mitrmkar
To get 'non-destructive writes', open the file specifying also the ios::in mode.
Forum: C++ Dec 5th, 2008
Replies: 6
Views: 492
Posted By mitrmkar
It appears as if you might have stumbled upon the virtualization feature of Windows Vista. Try looking it up on the MSDN.
Forum: C++ Nov 28th, 2008
Replies: 5
Views: 1,270
Posted By mitrmkar
You can circumvent that by ...

int main()
{
...
switch(option)
{
case 'h':
case 'H':
{ // new scope begins here ...
Forum: C++ Nov 23rd, 2008
Replies: 10
Views: 1,973
Posted By mitrmkar
Wouldn't it be easiest to add 'standard' ON_UPDATE_COMMAND_UI handlers for those two sub-menus, i.e. you'd have something along the lines of:

ON_UPDATE_COMMAND_UI(IDM_SUBMENU1, OnUpdateSubmenu1)...
Forum: C++ Nov 20th, 2008
Replies: 12
Views: 1,011
Posted By mitrmkar
Hmm, you have to understand that char editControl_Content[2]; allocates space for two chars.
The array indexes start from zero, meaning that the only indexes you are allowed to access in this case...
Forum: C++ Nov 20th, 2008
Replies: 12
Views: 1,011
Posted By mitrmkar
You are not getting the window text properly, it should be


char editControl_Content[2];
// the following gets one char into editControl_Content[0] and sets
// editControl_Content[1] to '\0'...
Forum: C++ Nov 7th, 2008
Replies: 12
Solved: New to SDL
Views: 1,374
Posted By mitrmkar
Well, by doing the following ...


...
background = load_image("background.bmp");

if(background == NULL)
{
// load_image() failed ...
cout << "load_image() failed, error: " <<...
Forum: C++ Nov 6th, 2008
Replies: 12
Solved: New to SDL
Views: 1,374
Posted By mitrmkar
Assuming that SDL is unable to load the image, you might place a call to SDL_GetError() (http://sdl.beuc.net/sdl.wiki/SDL_GetError) immediately after the line:
background =...
Forum: C++ Oct 27th, 2008
Replies: 2
Views: 408
Posted By mitrmkar
Try with these changes


//CUSTOMERDLL.H
#ifndef DllH
#define DllH
#include "customerForm.h"
extern TCustomerF* DllCustomer;...
Forum: C++ Oct 21st, 2008
Replies: 3
Views: 439
Posted By mitrmkar
I think you are using a 32-bit toolset (VS Express) and trying to link with the 64-bit version of libmysql.lib.
The 32-bit version of libmysql.lib comes with those missing symbols, what you have is...
Forum: C++ Oct 16th, 2008
Replies: 6
Views: 489
Posted By mitrmkar
Perhaps your intention was to replace also a '\v' with a space but you forgot to do it?
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 1,128
Posted By mitrmkar
Which compiler/OS are you using?
The (modified) code worked for me (Visual Studio 2005), but NOT with GCC 3.4.2.
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 1,128
Posted By mitrmkar
A couple of things

1) When opening the file, in addition to the ios::out|ios::in flags, specify one of: app, ate or trunc (http://www.cplusplus.com/reference/iostream/fstream/open.html) flag.
...
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 1,128
Posted By mitrmkar
One fix to the reading problem is to re-open the file, or alternatively you might implement
something similar to seekg() (http://www.cplusplus.com/reference/iostream/istream/seekg.html) to set...
Forum: C++ Sep 30th, 2008
Replies: 19
Views: 2,104
Posted By mitrmkar
I think you are after ...

typedef List<String^> Vec1;
typedef List<Vec1^> Vec2;

Vec2 List1;

for( int j = 0; j < 1000; j++ )
{
List1.Add(gcnew Vec1());
Forum: C++ Sep 27th, 2008
Replies: 26
Views: 3,088
Posted By mitrmkar
Use #include <time.h>, and use clock_t and clock() instead of std::clock_t and std::clock().
Forum: C++ Sep 4th, 2008
Replies: 13
Views: 1,109
Posted By mitrmkar
Hmm, just a thought .. how about changing one line of the signature to:

cout << "Hi there!" << "I'm a non-standard-compliant C++ coder!";


;)
Forum: C++ Sep 3rd, 2008
Replies: 5
Views: 439
Posted By mitrmkar
It appears as if you might find already deleted students, because of the ...

for (int n = 0; n < MAX_STUDENTS; n++)
{
if (strcmp(delStudent, students[n].ID) == 0)
{
Forum: C++ Sep 3rd, 2008
Replies: 5
Views: 521
Posted By mitrmkar
I think you'd want to have the string and the newline the other way around, i.e.

text += Dummy2 + System::Environment::NewLine;
Showing results 1 to 40 of 347

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC