Search Results

Showing results 1 to 40 of 57
Search took 0.01 seconds.
Search: Posts Made By: mitrmkar ; Forum: C++ and child forums
Forum: C++ Mar 28th, 2009
Replies: 8
Views: 765
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,295
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,295
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: 555
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: 668
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,078
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,838
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,300
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: 403
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: 434
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: 654
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,636
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,892
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: 497
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,791
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,158
Posted By mitrmkar
One obvious little error ...

if( jump = true )
Forum: C++ Aug 8th, 2008
Replies: 2
Views: 297
Posted By mitrmkar
Dereferencing was actually missing ... i.e.
if( (*(visualEntity.begin() + i))->LOD == wantLOD){
Forum: C++ Aug 7th, 2008
Replies: 17
Views: 1,617
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,085
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,085
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,156
Posted By mitrmkar
The code needs proper, consistent indentation.
Forum: C++ Jul 15th, 2008
Replies: 6
Views: 561
Posted By mitrmkar
See e.g. here (http://www.parashift.com/c++-faq-lite/serialization.html)
Forum: C++ Jul 10th, 2008
Replies: 2
Views: 832
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,255
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,074
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,672
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,161
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,029
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,029
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: 450
Posted By mitrmkar
Yes, when you want to release that memory, 'delete' needs to be issued.
Forum: C++ Jun 13th, 2008
Replies: 9
Views: 815
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,629
Posted By mitrmkar
Initialize outside the class i.e.
// outside your class ...
const HANDLE MultiReader::hReaderMutex = CreateMutex( NULL, TRUE, "ReaderMutex");
Forum: C++ Jun 10th, 2008
Replies: 10
Views: 3,520
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,267
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: 510
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: 645
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,...
Forum: C++ Jun 2nd, 2008
Replies: 2
Views: 462
Posted By mitrmkar
Yes, one way of doing it is ...

#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main()
{
int x = 123;
Forum: C++ May 28th, 2008
Replies: 6
Views: 790
Posted By mitrmkar
The following might work for you, assuming that the values are always comma-separated

string line;
double x,y,z;
char dummy; // for skipping commas

while ( getline(canopyfile, line) )
{...
Showing results 1 to 40 of 57

 


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

©2003 - 2009 DaniWeb® LLC