Search Results

Showing results 1 to 40 of 147
Search took 0.01 seconds.
Search: Posts Made By: Laiq Ahmed
Forum: C++ Oct 1st, 2009
Replies: 7
Views: 325
Posted By Laiq Ahmed
Hi,
your question is bit unclear... what are you storing in the multimap logically. What I've understood is that you want to get the multiple values against the same key


multimap<int, string> ...
Forum: C++ Sep 30th, 2009
Replies: 2
Views: 148
Posted By Laiq Ahmed
search Longest Common Subsequence algorithm. and modify that algorithm to meet your need.
Forum: C++ Sep 3rd, 2009
Replies: 5
Views: 343
Posted By Laiq Ahmed
when I was learning this topic. I followed the very good series of articles on code project, check the below link


Hope above helps.
Forum: C++ Aug 19th, 2009
Replies: 10
Views: 418
Posted By Laiq Ahmed
Thank you mcco for providing me the definition of RECT structure

kindly provide me the values (numbers), It seems that your expression evaluates to zero thats why I've asked to provide me the...
Forum: C++ Aug 19th, 2009
Replies: 10
Views: 418
Posted By Laiq Ahmed
What are the values of RECT members?
Forum: C++ Aug 12th, 2009
Replies: 9
Views: 528
Posted By Laiq Ahmed
hmmmmmmmmmm, I've come up with some solution to you problem hope this might help you.


class ICommand {
public:
virtual ~ICommand() = 0 { }
virtual void ExecuteCallBack(int iCommandId) = 0;...
Forum: C++ Aug 12th, 2009
Replies: 3
Solved: typedef enum
Views: 1,007
Posted By Laiq Ahmed
bool, true, false are already keyword in C++. you don't need to define enum for it.
Forum: C++ Aug 12th, 2009
Replies: 7
Views: 279
Posted By Laiq Ahmed
Hi FirstPerson,

I've tweaked your code to meet your needs, I think you are trying to acheive something like this.


class Tetris {
public:
bool DrawLine(unsigned int iColId) {
cout <<...
Forum: C++ Aug 11th, 2009
Replies: 5
Views: 328
Posted By Laiq Ahmed
I've few questions,


FrameVisitor::FrameVisitor()
{
Frame();
frames = get_frames(myfile);
}

you have passed 'myfile' as a parameter in fstream where it is defined?
Forum: C++ Aug 11th, 2009
Replies: 9
Views: 528
Posted By Laiq Ahmed
I don't think Command Design pattern best matches your need,

what you can do is simply create a Class that holds the map of Objects of type administrator, HR, Staff and value part contains the...
Forum: C++ Aug 11th, 2009
Replies: 2
Views: 239
Posted By Laiq Ahmed
it depends on the compiler rather than C++, you should see the compiler reference manual.
Forum: C++ Aug 11th, 2009
Replies: 7
Views: 279
Posted By Laiq Ahmed
I think you are trying to acheive the below one.


template<class T>
class Foo {
typedef void (T::*MFPtr)(int id);
MFPtr funcPtr;
public:
void SetDrawFunction(MFPtr memFunctionPtr) { ...
Forum: C++ Aug 10th, 2009
Replies: 9
Views: 528
Posted By Laiq Ahmed
sorry PETER_APIIT but your design has several flaws, describe you requirement a bit, then I will tweak your design to meet your needs.
Forum: C++ Aug 10th, 2009
Replies: 3
Views: 366
Posted By Laiq Ahmed
Read the following Link Carefully and check for MACRO & GUID that needs to be defined in case of XP, I am assuming that you are good in understanding msdn doc. If you still find it difficult to...
Forum: C++ Aug 10th, 2009
Replies: 5
Solved: loading bitmaps
Views: 480
Posted By Laiq Ahmed
Hi,
why you've called LoadBitmap(...) in WM_CREATE message? I am sure your problem will be resolved if you change WM_CREATE to WM_INITDIALOG.
further you should learn and understand the difference...
Forum: C++ Aug 10th, 2009
Replies: 4
Views: 398
Posted By Laiq Ahmed
peek basically reads the next available character without moving the file pointer.

for example if text file contains the following text


and if you execute the following psuedo Code

int...
Forum: C++ Aug 10th, 2009
Replies: 12
Views: 1,263
Posted By Laiq Ahmed
Forum: C++ Aug 10th, 2009
Replies: 12
Views: 1,263
Posted By Laiq Ahmed
try the below one

//HANDLE hPort = CreateFile("COM1", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
HANDLE hPort = CreateFile(TEXT("COM1"), GENERIC_READ|GENERIC_WRITE, 0, NULL,...
Forum: C++ Aug 7th, 2009
Replies: 7
Views: 349
Posted By Laiq Ahmed
@firstPerson the default Constructor & Destructor are not always trivial at the Compiler level, to users it might be...

Hi lotrsimp12345,

This usually irritates the programmer that why the...
Forum: C++ Aug 3rd, 2009
Replies: 3
Views: 281
Posted By Laiq Ahmed
Serialization & Deserialization technique would help you in acheiving this. or rather use the Boost which will provide you serialization & deserialization by not doing lot of work.

check the below...
Forum: C++ Aug 3rd, 2009
Replies: 4
Views: 234
Posted By Laiq Ahmed
I think you are mixing the pointer to Function with Pointer to member Function, I am giving you a little example on How to solve your problem.


class Foo {
public:
bool operator()(const int a)...
Forum: C++ Aug 2nd, 2009
Replies: 2
Views: 583
Posted By Laiq Ahmed
i) create an event and check that event in the child thread

ii) signal the event from main thread when you want to exit

iii) call UnhookWindowEx() and release resouces in the child thread.
...
Forum: C++ Jul 28th, 2009
Replies: 1
Views: 203
Posted By Laiq Ahmed
if you are using pthread then you can use the following API.


int pthread_attr_setschedparam(pthread_attr_t *tattr, const struct sched_param *param);


consult google for such questions :). it...
Forum: C++ Jul 28th, 2009
Replies: 2
Views: 151
Posted By Laiq Ahmed
take a look to the following link.

http://www.codeproject.com/KB/ISAPI/isapiredirector.aspx?fid=18786&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2967743
Forum: C++ Jul 27th, 2009
Replies: 1
Views: 271
Posted By Laiq Ahmed
I am sure that your BSTreeNode calss must be template class and you should provide the template argument to this as well.
like

BSTreeNode<DataType, KeyType>* BSTree<DataType, KeyType>::findMin...
Forum: C++ Jul 26th, 2009
Replies: 7
Views: 327
Posted By Laiq Ahmed
First of all for all native Applications written in C/C++ no Framework is required, well as you are using MFC in your project I think you must know the basics of Dll & CRT. In VS2008 create a Win32...
Forum: C++ Jul 26th, 2009
Replies: 2
Views: 428
Posted By Laiq Ahmed
I assume that you understand why Microsoft Compiler gives this warning... so explaining the solution...

if you use precompiled headers add the following lines in the stdafx.h and rebuild the...
Forum: C++ Jul 23rd, 2009
Replies: 11
Views: 395
Posted By Laiq Ahmed
tom Gun


As per the OOP paradigm strickly speaking in OOP, whenever you need the default behavior in Generic Type & want to specialize the behavior in derived you use the polymorphic behavior. Or...
Forum: C++ Jul 23rd, 2009
Replies: 7
Views: 622
Posted By Laiq Ahmed
Read about OWNER DRAW Window's Style and Windows Subclassing and also Non Client Paint Message.

Following Link would help but pre-requisit are the above two concepts.
...
Forum: C++ Jul 23rd, 2009
Replies: 7
Views: 234
Posted By Laiq Ahmed
basically whenever process is shutdown windows releases all the memory allocated by it, the problem regarding memory leak appears whenever the application kept on running and own the unreferenced...
Forum: C++ Jul 23rd, 2009
Replies: 7
Views: 234
Posted By Laiq Ahmed
Why don't you keep the connection level stuff at the application/module level rather than within the function, so when the game started the delay is bearable.

follow anciant dragon's advice and...
Forum: C++ Jul 22nd, 2009
Replies: 12
Views: 536
Posted By Laiq Ahmed
search for the WinINet. for Http.
Forum: C++ Jul 20th, 2009
Replies: 11
Views: 395
Posted By Laiq Ahmed
I don't understand your objective behing calling derive funciton in base at all, I understand C++ is multi paradigm language, but I can't see any logical reasoning behind this, could you please...
Forum: C++ Jul 20th, 2009
Replies: 4
Views: 222
Posted By Laiq Ahmed
try adding the following code in the very beginning.



#include <string>
using std::string;



this is the solution I can suggest without looking at the .zip file :)
Forum: C++ Jul 6th, 2009
Replies: 4
Views: 281
Posted By Laiq Ahmed
I can see problem here.

for(int i=0; i<int_totalNumChildren; i++) {
genTree->int_transactionID = tranID[i];

// in main
int tID = 100;
gTree->addChildren(&tID, numOfChildren);
Forum: C++ Jul 6th, 2009
Replies: 4
Views: 422
Posted By Laiq Ahmed
by the way following is also a legal syntax.

(obj.*m['a'])();


:).
Forum: C++ Jul 6th, 2009
Replies: 4
Views: 422
Posted By Laiq Ahmed
try the following.

the syntax seems difficult but look it carefully.

(f.*((*it).second))();
(f.*(it->second))();



the easier way is to create the typedef and assign the return value of...
Forum: C++ Jul 5th, 2009
Replies: 2
Views: 335
Posted By Laiq Ahmed
i can see the problem here..


return *max_element(cc.begin(),cc.end());


it shouldn't be like that, what if no values are being inserted in the vector. and your test [icode] moves[i] ==...
Forum: C++ Jul 5th, 2009
Replies: 3
Views: 1,170
Posted By Laiq Ahmed
try to figure out the algorithm used behind string.find(...), and compare it with standard string searching algorithm likes.

the above algorithms have different complexity based on the size of the...
Forum: C++ Jan 14th, 2009
Replies: 5
Views: 370
Posted By Laiq Ahmed
Why you search for the Random Value? is it your requirement?

int a=1 + int (10 * rand() / ( RAND_MAX + 1 ) );

this would result in a random number, theoratically every time you are creating a...
Showing results 1 to 40 of 147

 


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

©2003 - 2009 DaniWeb® LLC