- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 12
- Posts with Upvotes
- 10
- Upvoting Members
- 10
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Re: when I was learning this topic. I followed the very good series of articles on code project, check the below link [quote] [url]http://www.codeproject.com/KB/atl/atl_underthehood_.aspx[/url] [/quote] Hope above helps. | |
Re: I would recommend reading the following thread for detailed explanation on why cin is better to be used in while loop. [url]http://www.parashift.com/c++-faq-lite/input-output.html[/url] [15.2] Why does my program go into an infinite loop when someone enters an invalid input character? another thing if you want to break on the size of … | |
Re: try the below one [code] //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, OPEN_EXISTING, 0, NULL); [/code] Hope the above help, you didn't ask what is LPCWSTR ok :). So I am providing the solution only :P. | |
Re: I think J2ME Applications targets wide range of mobiles, while symbian OS has its own (change C++). I will suggests you to use Carbide for symbian development and j2ME ask anyone who knows j2me. I never worked on J2ME. but has enjoyed little development on Carbide :). | |
Re: [quote=darkAngel;321805]as above. [code] string s; cin >> s; [/code] for example, if the user enters Orange, i want it to convert to orange. please advise what i should do. thanks in advance[/quote] Check out this code [code] std::string str; cin>>str; transform(str.begin(), str.end(),str.begin(), tolower ); cout<< str; [/code] | |
Re: 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 [code=cpp] multimap<int, string> mm; mm.insert(std::make_pair(1, "a")); mm.insert(std::make_pair(1, "c")); mm.insert(std::make_pair(2, "d")); mm.insert(std::make_pair(2, "e")); typedef pair<multimap<int, string>::iterator, multimap<int, string>::iterator> Pair_Range; Pair_Range pRange … | |
Re: search Longest Common Subsequence algorithm. and modify that algorithm to meet your need. | |
Re: 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 between WM_CREATE & WM_INITDIALOG. | |
Re: sorry PETER_APIIT but your design has several flaws, describe you requirement a bit, then I will tweak your design to meet your needs. | |
Re: bool, true, false are already keyword in C++. you don't need to define enum for it. | |
Re: I think you are trying to acheive the below one. [code=cpp] template<class T> class Foo { typedef void (T::*MFPtr)(int id); MFPtr funcPtr; public: void SetDrawFunction(MFPtr memFunctionPtr) { this->funcPtr = memFunctionPtr; } void Draw(T obj, const int Id) { return (obj.*funcPtr)(Id); } }; class Bar { public: void DoIt(int id) { … | |
Re: I've few questions, [code] FrameVisitor::FrameVisitor() { Frame(); frames = get_frames(myfile); } [/code] you have passed 'myfile' as a parameter in fstream where it is defined? change the following Code. [code] list<Frame> FrameVisitor::get_frames(fstream& myfile) { char * memblock = new char [4]; //1º 4 bytes da frame...header. char * start = … | |
Re: it depends on the compiler rather than C++, you should see the compiler reference manual. | |
Re: 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 implement I will provide you the sample. [url]http://msdn.microsoft.com/en-us/library/bb773352(VS.85).aspx[/url] Hope the above link … | |
Re: peek basically reads the next available character without moving the file pointer. for example if text file contains the following text [quote] Hello, World [/quote] and if you execute the following psuedo Code [code=cpp] int main () { // open stream. char v = f.peek(); // the below line will … | |
Re: @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 compiler emits a default constructor. Let me explain you a bit detail of how C++ standard dictate about default constructor and … | |
Re: 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. [code=cpp] class Foo { public: bool operator()(const int a) { return (a==1); } }; // Don't pass Pointer to Function. typedef bool (*PF)(const … | |
Re: 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. psudo code [code=cpp] LONG WINAPI ThreadFunc(LPVOID arg) { HANDLE hEvent = OpenEvent(...,"ChildEvent"); // Perform Coding. // … | |
Re: 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 link [url]http://www.codeproject.com/KB/cpp/InterprocessSingleton.aspx[/url] | |
| |
Re: if you are using pthread then you can use the following API. [code] int pthread_attr_setschedparam(pthread_attr_t *tattr, const struct sched_param *param); [/code] consult google for such questions :). it will show you more answers. | |
Re: take a look to the following link. [url]http://www.codeproject.com/KB/ISAPI/isapiredirector.aspx?fid=18786&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2967743[/url] | |
Re: 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 Console Application and write a simple hello world program deploy that … | |
Re: I am sure that your BSTreeNode calss must be template class and you should provide the template argument to this as well. like [code] BSTreeNode<DataType, KeyType>* BSTree<DataType, KeyType>::findMin (BSTreeNode<DataType, KeyType>* root) const { // Implimentation ... } [/code]. otherwise provide the implementation of class BSTreeNode to identify the exact error. … | |
Re: [QUOTE=selsium;929931]hi folks, I have some 247 warnigs are same type warning C4996: 'fopen' was declared deprecated I am using makefile to compile my cpp program in Visual studio 2005. I have added _CRT_SECURE_NO_DEPRECATE in preprocessor definition too. but still I do get the warnings . Could anyone help me?[/QUOTE] I … | |
Re: 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 elloborate more.. so we can provide you better alternative than this, or correct any mistakes whatsoever | |
Re: 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 try using the concept of database pooling as well, these together will increase your frame-rate back to the one … | |
Re: 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. [url]http://www.codeguru.com/cpp/controls/controls/tabcontrols/article.php/c2237[/url] the Below is the link of VB Code just check How API's are being called. [url]http://www.vbaccelerator.com/home/VB/code/Controls/Tab_Controls/MDI_Tabs/article.asp[/url] try this tutorial, if no luck then … | |
Re: try adding the following code in the very beginning. [code] #include <string> using std::string; [/code] this is the solution I can suggest without looking at the .zip file :) Hope this helps. Good luck. |