- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
22 Posted Topics
Re: I don't really want to think at the moment, but I can post you my string reversing piece of code. Safe and elegant. [code=cplusplus] #include <string> string str="shankhs"; reverse(str.begin(), str.end()); [/code] | |
Re: All I can tell on this subject is: compilator do not detect problems or errors with directx, only withyour C++ syntax. Try get Dev C++ help on that error. Errors often are indicated at end of file, but they can occur anywhere. It is good to use 2 compilers so … | |
Re: I get this error: [code] error C2664: 'strcmp' : cannot convert parameter 1 from '__finddata64_t' to 'const char *' [/code] I pass data.name to string before calling strcmp(), but I wonder how it works for you. | |
Re: How is this possible technically? Every single mail server will archive emails and IMs..? | |
Re: For some reason I don't want develop for Linux. It usually lacks hi-level functions and you have to use fork(), shmget(), etc. You have much more free hand writing for Windows, and there is variety of tools with tips and diagrams so you don't have to be geek that much. … | |
![]() | Re: I'm quite sure he asked how to test keypress in while but I have no idea how to do it while( now) |
I'm trying to implement critical section using objects listed in this article: [url]http://www.mycplus.com/tutorial.asp?TID=290[/url] Somehow, it doesn't work like intended, or maybe I do something wrong. Basically my concept looks like this: [code=cplusplus] DirectoryReader::DirectoryReader(char* p_sConfigPath) { GetConfig(p_sConfigPath); if( hReaderMutex = CreateMutex( NULL, FALSE, "ReaderMutex") ) cout << "Mutex created!" << endl; … | |
Re: Just one tip: you don't need clock(). You counting virtual time, so you can represent this as integer. It's easier to add and calculate average queue time that way. Opps sorry Salem already wrote that. | |
Re: If you using C++ (you are posting in C++ forum) you should take advantage of STL library which is part of language now. You should almost always use STL containers and avoid C-style arrays. | |
I'm trying to call this function requested times. All functions and variables are members of one class, access is public. So, I'm calling like this: [code] void MultiReader::CreateThreads() { unsigned int nThreadNo; for( nThreadNo = 0; nThreadNo < vDirectories.size(); nThreadNo++) { CreateThread( NULL, 0, &MultiReader::ReaderThread, vDirectories.at(nThreadNo).sDirectoryName, 0, NULL); } } … | |
Re: [code] #include <cctype> // for toupper() #include <algorithm> // for transform() transform(x.begin(), x.end(), x.begin(), toupper); [/code] try this | |
Re: How about casting [icode]int* a = (int*)x;[/icode]? | |
Re: [url]http://www.google.com/search?hl=pl&q=generating+random+numbers+c%2B%2B&lr=[/url] First result for me is ling to DaniWeb article on generating random numbers. | |
Re: Yeah if you can't understand how to use simple bbcode, where is point od teaching you C++? You should try just a bit making people think on what you posted. My brain threw "Confused by earlier errors, bearing out". | |
I want recursively fill members of one structure, it looks like this: [code=cplusplsus] struct OPTIONS{ string sDirectoryName; vector<string> vExtensions; int uOperationId; } structCurrentDir; [/code] after filling all members I need to push this structure to another vector: [icode]vDirectories.push_back(structCurrentDir); [/icode] But then I need reset all members and I have problem. … | |
I'm trying to pass string as filename. I wonder if there is some smart function checking every character of string if it's alphanumeric, or belongs to group of few other character specified? Loop on every string character seems not very efficient for this. Any ideas? | |
Re: You need to empty this folder I guess. That's how Windows works if you noticed. Right now I am working on file listing class, it places all files in given subdirectory in vector of strings. If you are interested. | |
I'm starting writing class that should read configuration file and initialize some members with data from file. I decided to read this file in constructor. What should constructor do, if something goes wrong, and further construction of object have no sense? For now it displays message: [code] MultiReader::MultiReader(const char* m_sPath) … | |
Re: WonderAbu have no idea how to ask, and you guys answer quite advanced things. All I could advise is to check out some basics and terminology in C++: [url]http://en.wikipedia.org/wiki/Object_oriented_programming[/url] [url]http://en.wikipedia.org/wiki/C%2B%2B[/url] Available in other languages as well! | |
Hello everyone. Welcome to my first post. I have problem, it didn't brough me here, but maybe someone figure it out, I'm staring at this piece of code for hour. I'm trying to make directory listing class. It puts filenames and directories to vectors. It's not finished, yet not working … | |
Re: [url]http://www.cppreference.com/cppstring/find.html[/url] Use 1st variant in some kind of loop. | |
Re: I think you should use std library, which is now language standard. Safe and free of bugs list, queues, stuff with operators overloaded and many usefull constuctors waiting for you. [url]http://www.cppreference.com/[/url] |
The End.