User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 455,999 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,835 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 500
Search took 0.05 seconds.
Posts Made By: mitrmkar
Forum: C++ 11 Days Ago
Replies: 12
Views: 266
Posted By mitrmkar
Re: New to SDL

Well, by doing the following ...


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

if(background == NULL)
{
// load_image() failed ...
cout << "load_image() failed, error: " << SDL_GetError()...
Forum: C++ 11 Days Ago
Replies: 12
Views: 266
Posted By mitrmkar
Re: New to SDL

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++ 18 Days Ago
Replies: 2
Views: 183
Posted By mitrmkar
Re: How to get current windows logged on users profile directory.

See SHGetKnownFolderPath (http://msdn.microsoft.com/en-us/library/bb762188(VS.85).aspx)
Forum: C++ 19 Days Ago
Replies: 2
Views: 183
Posted By mitrmkar
Re: Question regarding new/delete vs. malloc/free

That allocates you a single double, initialized with the value of numrows. In that case, you delete that double by: delete lvec;


Anyhow, you need to do ...


// try allocating numrows doubles...
Forum: C++ 22 Days Ago
Replies: 9
Views: 263
Posted By mitrmkar
Re: Convolution helP

Microsoft has documented the compiler/linker errors/warnings, so you can try looking them up in the MSDN or in the IDE's help, if you have it installed.

See Compiler Error C2601...
Forum: C++ 22 Days Ago
Replies: 5
Views: 151
Posted By mitrmkar
Re: DLL Function Call

About code tags ... you don't have to type in the line numbers in the code you post, just specify cplusplus as the syntax i.e.


// code pasted here ...
Forum: C++ 22 Days Ago
Replies: 2
Views: 124
Posted By mitrmkar
Re: Definition problem

Try with these changes


//CUSTOMERDLL.H
#ifndef DllH
#define DllH
#include "customerForm.h"
extern TCustomerF*...
Forum: C++ 26 Days Ago
Replies: 7
Views: 315
Posted By mitrmkar
Re: Changed event in fileSystemWatcher

I guess that your editor makes calls to Windows API functions that cause the event to occur twice. You might write a simple test program which does a fopen()/fwrite()/fclose() sequence, the event...
Forum: C++ 28 Days Ago
Replies: 3
Views: 151
Posted By mitrmkar
Re: MySql++ Link Errors

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++ 31 Days Ago
Replies: 15
Views: 384
Posted By mitrmkar
Re: *** glibc detected *** ./moo.exe: free(): invalid pointer: 0xb7f226ec ***

Rather use new instead of malloc() for allocating the scout structures (because scout contains a std::string member variable)
Forum: C++ 31 Days Ago
Replies: 13
Views: 283
Posted By mitrmkar
Re: Struct: Having trouble reading into my file

You most definitely want to take the inData.open("Unknown.txt"); and inData.close(); out of the for() loop. Open the file before you enter the loop and close the file after the loop has finished.
Forum: C++ 33 Days Ago
Replies: 6
Views: 180
Posted By mitrmkar
Re: Array manipulation trouble

Perhaps your intention was to replace also a '\v' with a space but you forgot to do it?
Forum: C++ Oct 10th, 2008
Replies: 3
Views: 214
Posted By mitrmkar
Re: Win32 RichEdit ContextMenu and Click Tracking Problem

The following should work ...

LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_CREATE:

// ... create the richedit window here ->...
Forum: C++ Oct 8th, 2008
Replies: 3
Views: 295
Posted By mitrmkar
Re: Please Help! GetAsyncKeyState(); command help in C++

You'll probably find Reading Input Buffer Events (http://msdn.microsoft.com/en-us/library/ms685035(VS.85).aspx) useful.
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 426
Posted By mitrmkar
Re: file handling problem

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: 33
Views: 885
Posted By mitrmkar
Re: removing spaces from string

temp[0] is actually in the ivailosp's program, however you must use what niek_e told, which is:
temp[count] = '\0';.
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 426
Posted By mitrmkar
Re: file handling problem

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.

2)...
Forum: C++ Oct 1st, 2008
Replies: 11
Views: 426
Posted By mitrmkar
Re: file handling problem

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: 732
Posted By mitrmkar
Re: Vector Dimensions

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 30th, 2008
Replies: 7
Views: 252
Posted By mitrmkar
Re: strange windows error

You should initialize ElementAmount to zero. Note that if you compile with the -pedantic option, you'll get an error about variable-size array usage, i.e. you might want to change ...

char...
Forum: C++ Sep 29th, 2008
Replies: 9
Views: 267
Posted By mitrmkar
Re: getline() issue

Change s.erase(pos, pos); to s.erase(pos, 1);. The second parameter tells how many characters to remove at index pos.

[EDIT]
Seems I was late ...
Forum: C++ Sep 27th, 2008
Replies: 7
Views: 275
Posted By mitrmkar
Re: priority of Function

You might try something like ...

#include <iostream>
using namespace std;
struct test
{
void myfunction()
{
cout << "myfunction()\n";
}
Forum: C++ Sep 27th, 2008
Replies: 26
Views: 977
Posted By mitrmkar
Re: c++ source code problem urgent!!!!

Use #include <time.h>, and use clock_t and clock() instead of std::clock_t and std::clock().
Forum: C Sep 26th, 2008
Replies: 8
Views: 360
Posted By mitrmkar
Re: Problem related to c in looping

Hmm .. or even less


puts("*\n***\n******\n*******\n*********");
Forum: C++ Sep 26th, 2008
Replies: 9
Views: 316
Posted By mitrmkar
Re: Fast Conversions

Results of double_to_string() is somewhat off due to a missing zero ...
Forum: C++ Sep 25th, 2008
Replies: 3
Views: 220
Posted By mitrmkar
Re: help me finding the bug while reading boot sector

That gives you the master boot record (http://en.wikipedia.org/wiki/Master_boot_record) (MBR).

Based on the partition table (http://www.ntfs.com/partition-table.htm)s within the MBR, you can locate...
Forum: C++ Sep 21st, 2008
Replies: 2
Views: 156
Posted By mitrmkar
Re: emergency!!help me...

It means that the i exists only within the for() loop.

You might change it to ...

int i;
for (i=0; i<20; i++)
{
r [i]=0;
}
// ...
Forum: C++ Sep 20th, 2008
Replies: 18
Views: 399
Posted By mitrmkar
Re: Strings?? Help Needed

Avoid Loop Control Using eof() (http://www.daniweb.com/forums/post155265-18.html)
Forum: C++ Sep 18th, 2008
Replies: 5
Views: 278
Posted By mitrmkar
Re: how to install True Type Font when installing the Application?

See AddFontResource (http://msdn.microsoft.com/en-us/library/aa911430.aspx)
Forum: C++ Sep 14th, 2008
Replies: 3
Views: 239
Posted By mitrmkar
Re: std::remove() syntax

remove() (http://www.cplusplus.com/reference/clibrary/cstdio/remove.html)
Forum: C++ Sep 13th, 2008
Replies: 3
Views: 174
Posted By mitrmkar
Re: trouble with bools...I think

You are not converting from a char to int in the valid() function when comparing with 'a'.

Then a couple of notes:

- try choosing meaningful names, e.g. the valid() function takes three arguments...
Forum: C++ Sep 11th, 2008
Replies: 22
Views: 1,260
Posted By mitrmkar
Re: Passing a member function pointer

That error occurs also if you have implemented the mouse() function in a header file (.h) and include that header file in two or more source files (.cpp). So, you should move the implementation of...
Forum: Windows tips 'n' tweaks Sep 11th, 2008
Replies: 6
Views: 646
Posted By mitrmkar
Re: Cant Delete a File

You might download SysInternal's Process Explorer (http://technet.microsoft.com/fi-fi/sysinternals/bb896653(en-us).aspx) and use its Find handle or DLL utility to see which process has that .nrg file...
Forum: C++ Sep 10th, 2008
Replies: 7
Views: 437
Posted By mitrmkar
Re: MySQL++

Could it be a 32/64-bit mismatch, for example libmysql.lib actually being the 64-bit version?
Forum: C++ Sep 10th, 2008
Replies: 7
Views: 437
Posted By mitrmkar
Re: MySQL++

Sounds strange, I dumped the libmysql.lib exports

dumpbin /exports libmysql.lib =>
...
_my_realloc
_my_strdup
_myodbc_remove_escape@8
_mysql_affected_rows@4
_mysql_autocommit@8
_mysql_change_user@16
Forum: C++ Sep 7th, 2008
Replies: 2
Views: 288
Posted By mitrmkar
Re: VC++ Runtime Error

Don't use window styles there, instead specify a combination of class styles, see http://msdn.microsoft.com/en-us/library/ms633574(VS.85).aspx#class_styles
Forum: C++ Sep 4th, 2008
Replies: 5
Views: 296
Posted By mitrmkar
Re: Compile-time printing?

There is also a manipulator by the same name, flush (http://www.cplusplus.com/reference/iostream/manipulators/flush.html)
Forum: C++ Sep 4th, 2008
Replies: 13
Views: 479
Posted By mitrmkar
Re: Line count not working....

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: 173
Posted By mitrmkar
Re: Problem with deleting/replacing of arrays

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: 16
Views: 361
Posted By mitrmkar
Re: Urgent Help in Binary Search Trees..

Well, first of all, be consistent with the names of the member functions, for example

int BST::SEARCHtree(node* i, int k)
{
if(i==NULL)
{
return 0;
}

else if(k == i->key)
Showing results 1 to 40 of 500

 
All times are GMT -4. The time now is 9:51 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC