Search Results

Showing results 1 to 40 of 65
Search took 0.01 seconds.
Search: Posts Made By: mitrmkar
Forum: C++ Mar 28th, 2009
Replies: 8
Views: 770
Posted By mitrmkar
That is not quite correct, see comments

int main(void)
{
/* Declare the '2D Array' */
char ** ptr = new char * [5];
ptr[0] = new char[20];
ptr[1] = new char[20];
ptr[2] =...
Forum: C++ Mar 16th, 2009
Replies: 17
Views: 1,325
Posted By mitrmkar
Umm, maybe you misunderstood me (?). I was not trying to say that MSVC 6.0 cannot be used on Windows versions later than "Windows Server 2003".

Instead, I was trying to say that the "Windows...
Forum: C++ Mar 16th, 2009
Replies: 17
Views: 1,325
Posted By mitrmkar
You might look at Using Visual C++ 2008 Express with the Windows SDK (http://blogs.msdn.com/windowssdk/archive/2008/02/22/using-visual-c-2008-express-with-the-windows-sdk-detailed-version.aspx)
Forum: C++ Mar 10th, 2009
Replies: 4
Views: 565
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++ Feb 27th, 2009
Replies: 4
Views: 676
Posted By mitrmkar
To get 'non-destructive writes', open the file specifying also the ios::in mode.
Forum: C++ Feb 17th, 2009
Replies: 12
Views: 3,127
Posted By mitrmkar
Both the pFrom and pTo members need to be double-null terminated, see the
SHFILEOPSTRUCT Structure (http://msdn.microsoft.com/en-us/library/bb759795(VS.85).aspx) documentation.
Forum: C++ Feb 4th, 2009
Replies: 13
Views: 2,886
Posted By mitrmkar
IsWindowVisible() (http://msdn.microsoft.com/en-us/library/ms633530(VS.85).aspx) might be useful.
Forum: C++ Nov 7th, 2008
Replies: 12
Solved: New to SDL
Views: 1,320
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++ Oct 27th, 2008
Replies: 2
Views: 406
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: 435
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++ Sep 27th, 2008
Replies: 7
Views: 657
Posted By mitrmkar
You might try something like ...

#include <iostream>
using namespace std;
struct test
{
void myfunction()
{
cout << "myfunction()\n";
}
Forum: C++ Aug 29th, 2008
Replies: 7
Views: 1,651
Posted By mitrmkar
Here is how you get items of a single (selected) row

TListItem * Item = ListView1->Selected;
if(Item)
{
AnsiString text = Item->Caption;
TStrings * subItems = Item->SubItems;

...
Forum: C++ Aug 22nd, 2008
Replies: 13
Views: 2,899
Posted By mitrmkar
But really consider that presumably TurboC was released before most of the students posting here were even born. So, please do not advertise an antiquated/out dated tool for these students. (If...
Forum: C++ Aug 21st, 2008
Replies: 2
Views: 498
Posted By mitrmkar
Your myFunc typedef does not match the DLL function's signature because you've omitted the calling convention from the typedef (by default, VC++ uses the _cdecl calling convention). So you need to...
Forum: C++ Aug 16th, 2008
Replies: 18
Views: 3,821
Posted By mitrmkar
Go through the stored items in the Library's destructor and explicitly delete the items there.
Forum: C++ Aug 11th, 2008
Replies: 2
Views: 351
Posted By mitrmkar
Since you have

printVector(vector<T> & x)


pass by reference ...

printVector( x );
Forum: C++ Aug 11th, 2008
Replies: 9
Views: 1,163
Posted By mitrmkar
One obvious little error ...

if( jump = true )
Forum: C++ Aug 8th, 2008
Replies: 2
Views: 299
Posted By mitrmkar
Dereferencing was actually missing ... i.e.
if( (*(visualEntity.begin() + i))->LOD == wantLOD){
Forum: C++ Aug 7th, 2008
Replies: 17
Views: 1,625
Posted By mitrmkar
No, the point is that the specific object that you have on the heap, is NOT stored into the list. Instead, the derefenced pointer which you supply to push_back(..) is only used to construct another...
Forum: C++ Aug 6th, 2008
Replies: 9
Views: 853
Posted By mitrmkar
You are missing ...


bResult = DeviceIoControl(hDevice, // device to be queried
IOCTL_DISK_GET_DRIVE_GEOMETRY, // operation to perform
NULL, 0, // no...
Forum: C++ Jul 23rd, 2008
Replies: 42
Solved: Arrays
Views: 3,098
Posted By mitrmkar
Try not to use the goto, have you considered using break instead

for(int i=0; i<10; i++) {
if (i > 0)
break; // <- breaks out of the for loop ...
else
cout << i;
}
Forum: C++ Jul 22nd, 2008
Replies: 42
Solved: Arrays
Views: 3,098
Posted By mitrmkar
Futhermore, you have the variables the wrong way around, i.e. instead of

a >> strin;


use

strin >>a;
Forum: C++ Jul 22nd, 2008
Replies: 17
Views: 1,162
Posted By mitrmkar
The code needs proper, consistent indentation.
Forum: C++ Jul 15th, 2008
Replies: 6
Views: 564
Posted By mitrmkar
See e.g. here (http://www.parashift.com/c++-faq-lite/serialization.html)
Forum: C Jul 15th, 2008
Replies: 2
Views: 470
Posted By mitrmkar
The function is malloc(), not maloc().
Forum: C++ Jul 10th, 2008
Replies: 2
Views: 836
Posted By mitrmkar
See e.g. RegQueryInfoKey() (http://msdn.microsoft.com/en-us/library/ms724902(VS.85).aspx)
Forum: C++ Jul 8th, 2008
Replies: 48
Views: 3,270
Posted By mitrmkar
At least a couple of severe errors ...


...
payroll *employee[6], *report;
// here you call printreport() through an uninitialized/unallocated pointer,
// it is a big no-no ...
Forum: C++ Jul 1st, 2008
Replies: 11
Views: 1,079
Posted By mitrmkar
For example the remove() function cannot be passed in a const string &, because the function modifies the argument. So you need to have ...

bool remove ( std::string & x );
Forum: C++ Jun 30th, 2008
Replies: 7
Views: 5,777
Posted By mitrmkar
Here is one way to trim leading whitespace

string test_string = " test_string";
string ws = " \t";

// lookup the position of the first non-whitespace char, if any
...
Forum: C++ Jun 27th, 2008
Replies: 11
Views: 1,168
Posted By mitrmkar
Pick up the habbit of using e.g. the following compiler options -W -pedantic -Wall.
When you compile, work through the error/warning list until your program compiles cleanly.

Here is a guide...
Forum: C++ Jun 26th, 2008
Replies: 29
Views: 3,049
Posted By mitrmkar
It appears that you are confused by the link ordinals in the .def files. If you take a look at the original .def file, there may be e.g a line like

LT360LIB_OpenLinkUSB @2 ;...
Forum: C++ Jun 26th, 2008
Replies: 29
Views: 3,049
Posted By mitrmkar
Just occurred to me that probably you'll have to do some changes before using LIB.exe. Apparently the .DLL functions use __stdcall calling convention, so you'll have to modify each function so that...
Forum: C++ Jun 20th, 2008
Replies: 3
Views: 452
Posted By mitrmkar
Yes, when you want to release that memory, 'delete' needs to be issued.
Forum: C++ Jun 13th, 2008
Replies: 9
Views: 816
Posted By mitrmkar
Two simple examples, hopefully you'll get something figured out of those ...
class a
{
public:
a(string s1, string s2){}
};
class b : public a
{
public:
// default ctor
Forum: C++ Jun 12th, 2008
Replies: 17
Views: 1,638
Posted By mitrmkar
Initialize outside the class i.e.
// outside your class ...
const HANDLE MultiReader::hReaderMutex = CreateMutex( NULL, TRUE, "ReaderMutex");
Forum: C Jun 11th, 2008
Replies: 2
Views: 502
Posted By mitrmkar
int myfunction(int argc, char *argv[]){
int i;
for(i=0;i<argc;i++)
unlink(argv[i]);
}
int main(){

int argc; // argc is not initialized to any value, what might be its value here ??...
Forum: C++ Jun 10th, 2008
Replies: 10
Views: 3,576
Posted By mitrmkar
A note regarding clipboard usage, whenever you successfully open the clipboard, don't forget to close it by calling CloseClipboard() when you're done with the clipboard operations.
Forum: C++ Jun 7th, 2008
Replies: 20
Views: 2,278
Posted By mitrmkar
Some more corrections in red ...


/*------------------------------------------------------------------
* Assignment 7: FIRST LINKED LIST ASSIGNMENT.
*Worth: 50 points
*Made by: Samuel Georgeo...
Forum: C++ Jun 5th, 2008
Replies: 2
Solved: Returning bool
Views: 515
Posted By mitrmkar
I guess you are after this


class test
{
bool is_good;

public:
test() : is_good(true){}
Forum: C++ Jun 3rd, 2008
Replies: 4
Views: 648
Posted By mitrmkar
I assume variable2 is std::string, in which case you are to use:
strcat(variable1, variable2.c_str());

Just in case you are not too familiar with std::string, you can avoid strcat() completely,...
Showing results 1 to 40 of 65

 


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

©2003 - 2009 DaniWeb® LLC