6,741 Posted Topics
Re: [url]http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_sorting.aspx#insert[/url] | |
Re: 1) The required minimum limit is 12. Beyond that, you're relying on your implementation. Note that this limit refers to pointer, array, and function declarators combined. >What is the reason that compiler will not detect this error if it is not in single file? Because most compilers don't implement static … | |
Re: Two problems. First, I suspect you're using Visual Studio 6.0, in which case you should be aware that standard C++ says i is out of scope when you use it outside of the loop. To be correct, you should change your loop from this: [code=cplusplus] for(int i = 0; i<PROCESSORS; … | |
Re: You have to loop it: [code=cplusplus] int var; bool repeat; do { repeat = false; cin>> var; switch ( var ) { //... default: repeat = true; } } while ( repeat ); [/code] | |
Re: >Name: Julienne Walker >Position: Team Leader >Company: I choose not to say. >1. What are the functions of your industry and profession? I'm in the field of creating developer tools, specifically compilers, libraries, and the like. >a. What is your title? how long have you been in this position? I'm … | |
Re: >How to display the statement without using semicolon in c programming? I can think of several specific questions based on this vague summary, and each has a different answer. Be more detailed, please. However, the most likely answer is to run away as fast as you can because question like … | |
Re: Your personal feelings really have no bearing on whether a post breaks the rules or not. If there's any question, if you say to yourself "should I report this?", then please do so. Most likely your gut feeling is correct and we need to do something about a rule violation. | |
Re: >temp->ptr=start1; temp->ptr is a pointer to a link structure, start1 is a pointer to a link1 structure. They are not interchangeable. | |
Re: In this case, only the client code knows how data can be serialized, so your best bet is to require the client to give you a serializer for the data (whose interface you provide). This also helps to make a clean break between the data, which is owned by the … | |
Re: >How to check whether the given file path is valid or not in C Don't bother. The OS already implements this behavior, so why add a redundant (and likely inferior) step? Simply pass the path to the appropriate library function and it will get validated somewhere along the line. >independent … | |
Re: >Actually what the author want to say by using these terms. They want to say DISK-READ and DISK-WRITE, obviously because those terms are self-explanatory. If you want to convert that to C, consider fread and fwrite, or look into other ways of serializing your nodes. | |
Re: >was wondering if anyone else does Pokemon is like watching porn. Everyone who does it will vehemently deny it when the topic comes up. As such, don't expect your Pokemon hacker peers to step forward. :D | |
Re: >So my question is what is the best way to write this? Without more details, I'll offer the recommendation that your class shouldn't prompt for input because that hurts its flexibility. Your initial design is better, where the calling code provides the constructor arguments. If you need to add prompts, … | |
Re: >How useful would these books be in terms of the >language as it has progressed in the last 10 or so years. Naturally they won't be useful if you need information on changes made since those books were written, but old books are still a wealth of knowledge. Just read … | |
Re: >What am i doing wrong/??? You're asking a debugging question without having tried to debug. Do you think we can look at any piece of code and know what's wrong? No, we have to debug. That's about 90% of what programming is. You run the program. You run the program … | |
Re: >I was wondering if anyone has used this book Yes, though you've discovered independently that it's not suited for beginners. >any recommendations for books that might be easier to understand Accelerated C++ by Andrew Koenig and Barbara Moo. This book is designed for beginners and covers roughly 90% of the … | |
Re: >any idea on how i can get started guys? Remove extraneous features from the definition until you have the minimum required core of the program. That should simplify your task considerably, and you can add features as you verify that what you've already written is working correctly. | |
Re: >Why is there assembly code for the string class of C++? On your implementation, you mean. The answer is probably optimization, especially if you read the code and understand what the algorithm is trying to achieve. >How can you be sure the listing is how the C++ compiler designers implemented … | |
Re: >im not sure if a semicolon is needed. The basic guideline is that the semicolon is a statement terminator, so unless you're working with a compound statement (where braces surround zero or more statements), you need to finish with a semicolon. That's why you don't need a semicolon after this … | |
Re: >so save yourself a lot of trouble by not trying to report it to the FBI. People who threaten to contact the authorities on a thread are nearly always harmless kooks who don't respond to rational arguments (translation: they're trolls). Just sit back and enjoy the show, because this guy … | |
Re: >Any suggestions?? Open the file with the ios::app mode, then you don't have to worry about it. Every write will be an append. | |
Re: The direct equivalent to a byte is unsigned char, so: [code=c] unsigned char bytes[6]; [/code] | |
Re: The classic solution is a union, but you can't have a union of points unless the Point class has a trivial constructor. Another option is to store objects of a proxy class instead of storing Point objects directly. The proxy class will handle the disconnect between objects and pointers, and … | |
Re: >Is there a open source relational data base? MySQL. | |
Re: >i've never, ever seen a simple, decent c++ implementation of it Write one. That's what I do when I can't find a satisfactory implementation to pinch. Just find a good description of the algorithm and construct the code yourself; be careful not to get stuck on descriptions of an implementation, … | |
Re: >i want to write forward pointer address in present pointer field. If I understand your problem correctly, you have two immediate options: [LIST=1] [*]Get the current address, then offset it by the known amount and write it. [*]Seek forward, save the current address, then seek back and write it. [/LIST] | |
Re: >Visual C++ dislikes this. Any conforming C++ compiler should dislike it. >Is this just VC being an incredible pain or is there a good reason for this? There's a good reason. Without going into excessive detail, because std::vector<T>::iterator is a qualified name that's dependent on the template argument T, there's … | |
Re: >I'm very new to C++ and have two questions whose answers are probably comically obvious. I/O in C++ is rarely obvious. 1) When an input request fails, cin is put into an error state, which basically means that any further input requests will also fail. This includes a request to … | |
Re: If the FileSystemWatcher is running in asynchronous mode, events will fire when they happen, and if the handler relies on having an exclusive lock, you'll get an error. Here's the kicker though: when the changed event is fired and you open the file, the access time will change and fire … | |
Re: >That seems to be .NET, so don't be astonished if your question leaves unanswered here. This is the best forum to get answers on both C++/CLI and Managed C++. | |
Re: >Question 1) What exactly does widen() do? It takes the character you pass and converts it to the locale the stream is imbued with. For example, you want to convert a character literal to the appropriate wchar_t value if the stream is wide oriented, but leave it as is if … | |
Re: I'm looking at the site in Firefox presently, and everything seems fine. What do you mean by "it didn't work properly"? | |
Re: >I want it in three files. [code=c] /* lucky.h */ int addthree(int x); [/code] [code=c] /* add-three.c */ #include "lucky.h" int addthree(int x) { int s = 0; s = x +3; return s; } [/code] [code=c] /* solution.c */ #include "lucky.h" int main() { int num; int d = … | |
Re: [url]http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_sorting.aspx[/url] | |
Re: >I have tried my best but i couldn't produce the right code. Post your best attempt and we'll help you correct it. | |
Re: >How can i delete a particular element using delete operator? Can you be more specific? A vague question produces vague answers, or completely off-the-wall answers as exhibited by the previous reply. | |
Re: >If you found it, can you mark this thread as solved? No pressure though, ai ([B][I][U]DO IT! DO IT NOW!!!!![/U][/I][/B]). ;) | |
Re: There's a function called toupper. Check your C reference for more details. | |
Re: >Then what are they written in ? MonkeyLanguage? You can write the lion's share of a compiler in any language you please. The only real restriction would be the code generator, where you need a language that can write to your target format. | |
Re: >You don't seem to have neither a namespace nor a class defined, both of which are needed. A namespace isn't required, but for obvious reasons at least one class is. | |
Re: >I think that is where my problem is. I think your messed up main function is where the problem is. Compare your code to this: [code=cplusplus] int main() { ifstream in ( "test.txt" ); if ( !in ) cout<< "There was an error unable to read file!"; else { string … | |
Re: >Is it possible to some how tell the compiler to use >these symbols even if they aren't in ASCII? You need to specify what you mean by "tell the compiler". Of course you can write code to make use of different character sets, but it's not as trivial as using … | |
Re: >Will turbo C++ allow C99 standard things? [I]Most[/I] modern compilers don't compile C99. It's not a popular enough standard even to be completely implemented, much less widely implemented. You'll be hard pressed to find a C++ compiler that isn't very stable with C89 though, provided you pass it the right … | |
Re: The Design and Evolution of C++ by Bjarne Stroustrup Inside the C++ Object Model by Stanley Lippman C++ Templates: The Complete Guide by Vandevoorde and Josuttis | |
I notice that the quick edit box for an existing post has a quote button, but not code, tex, or icode buttons. Meaning that one has to type the tags manually or go to the advanced edit page. Is this an oversight, or are there legitimate reasons for it? | |
Re: >i hate this poping up advertisement boxes Dani doesn't allow invasive popups. Post a screenshot so she can determine where it came from and chastise accordingly. |
The End.