| twicker (54) | |
|
Which would you say are the most frequently asked questions here? The FAQ article (information section) badly needs a rewrite, and the forum's input can be really valuable for that. | |
|
|
|
| Duoas (6335) | |
|
This is a very good question. Introduction to C++ What is C++? Is C++ a proprietary language? Do I need to pay to use it? What are the C++ Language Standards? How do I know if my compiler supports a Standard? Do I need to learn C or another language first? How can I best learn C++? What do I need to get started? What is OOP (Object Oriented Programming)? What are templates and "generic programming"? How do I make windowed (GUI) programs? What is Visual C++? What does "visual programming" mean? Arrays, Strings, Sequences, etc strings 008-0 - Split a string? 008-1 - Parse CSV data? 008-3 - Parse XML data? 078 - - C-strings and pointers? 008-2 - strtok()! 017-0 - toupper() or tolower() a string? 017-1 - Compare strings without case-sensitivity? 055 - - trim() a string? 048 - - Use strings in a switch statement? 081 - - Linked lists (basics, singly, doubly) 082 - - Print an array/vector/list/etc arrays 044-0 - sizeof() doesn't work on arrays! 044-0 - Determine the dimension(s) of my array? 044-1 - Pass my (N-dimensional) array to a function? 044-2 - Pass any (N-dimensional) array to a single function? sequencing 060-0 - Sort stuff? 060-1 - Sort stuff myself? 074 - - Reverse a string/array/etc? Beginners / Homework 020 - - Palindromes 022 - - Is there a NULL for int, float, etc? 023 - - Pointers vs. References 028 - - Headers and Source Files (.h and .cpp files) 031 - * Why is my program skipping input? <i>this will also include some beginner stuff in addition to the link to the I/O section</i> 035-0 - Convert a number to/from a char? 035-1 - Convert numbers to/from a string? 041-0 * Overloading the Assignment Operator 041-1 * Overloading Comparison Operators (< == <= > >= !=) 041-2 * Overloading << (the Stream Insertion Operator) 041-3 * Overloading >> (the Stream Extraction Operator) 042 - * Return more than one thing from a function? 043 - * Read a specific line from a file? 044-0 * sizeof() doesn't work on arrays! 044-1 * Determine the dimension(s) of my array? 044-2 * Pass my (N-dimensional) array to a function? 044-3 * Pass any (N-dimensional) array to a single function? 045 - * Random numbers? 047-0 - Star Pyramid 047-1 - Center text on the screen? 047-2 - Positioning text / stars / menus / etc? 055 - * trim() a string? 065-0 - Caesar ciphers? 065-1 - XOR ciphers? 065-2 - Encrypt and decrypt stuff? 071 - * i = ++i + i++; <i>not sure where to put this one</i> 072 - * operator precedence issues 079 - - Why doesn't 2^3 equal 8? 073 - * What C++ books should I buy? 074 - * Reverse a string/array/etc? 077 - - Recursion 083 - * logic problems (why does "if (x = 7 || 8)" always evaluate true?) Compiling and Linking 053 - - troubles with verbose template errors 056 - - issues with linking (static and dynamic) 062 - - (error messages due to) outdated compilers 063 - - compiling 066 - * what the heck are calling conventions and why do I need them? 069 - - using make Dealing with Numbers 004 - * how do I read/validate a <number> (making sure it is a <number>, and nothing else) 035 - - how do I convert numbers to chars or strings, or vice-versa 038 - - anything about special numbers: +INF/-INF, NAN, MAX_INT, etc. 045 - - confusion over random numbers (specifically, how to properly use [code]srand[/b]() and rand() ) 054 - - how do I "type" a user input (as an integer, a float, etc) 057 - - issues with rounding 064 - - issues with floats (see also #38) 076 - - how do I convert between radices/how do I do base conversion (dec to hex, etc)? Functions, Arguments, Return Values 019 - - confusion over void 042 - - how do I return multiple values from a function 050 - - problems with va_args, etc 066 - * what the heck are calling conventions and why do I need them? 078 - - anything about return values 080 - - default arguments in C99 Images, Graphics and GUIs 002 - - how do I read/write <image file format> 012 - - anything about <graphics.h> / WinBGIm 024 - - how do I get a screenshot / the pixel color under the mouse / etc. (for stuff outside my app) 051 - - how do I create a GUI (application) Input and Output 004 - * how do I read/validate a <number> (making sure it is a <number>, and nothing else) 018 - * how do I make my application use multiple languages 030 - - how do I know if the standard streams are redirected to/from file(s) 031 - - my program skips user input (because OP is mixing >> and getline()); cin >> string doesn't work with spaces; etc. 032 - - how do I read/write binary data 033 - - how do I serialize my class (this is almost never asked correctly, as the OP does not know the word "serialization") 034 - - confusion over EOF issues (such as looping on EOF, or trying to read EOF, etc) 039 - - how do I make w[cout|cin|string|stream|etc] work? (it won't, at least without some serious locale hacking - better to use a library) 040 - * how do I download files from the internet (programmatically, of course) 043 - - how do I read a specific line/datum from a file (usually a text file) 054 - - how do I "type" a user input (as an integer, a float, etc) 070 - - structure packing and dealing with binary data (see also #32) 075 - - how do I open a file/using a user-input string? Language and Style 003 - - how do I repeat main() 007 - - anything about goto 015 - - what indent style do you use 016 - - anything about Hungarian Notation 037 - - what IDE do you use 041 - - anything about overloading operators, particularly: assignment, comparision, and stream insertion/extraction 052 - - troubles with templates 061 - - void main() vs int main() (see also #3 and #19) 067 - - entry points (see also #63) 071 - * issues with the increment & decrement operators and sequence points 072 - - operator precedence issues (see also #71) 073 - - what C++ book should I get? 083 - - logic problems (why does "if (x = 7 || 8)" always evaluate true?) Parent / Child / Processes 005 - - how do I write a virus/keylogger/other script-kiddie nonsense 010 - - how do I execute another program (safely) 011 - - how do I manipulate another application (i.e. control it in some way) 029 - - how do I include external data (such as images) in my executable 049 - - problems with fork(), etc Working with the Console 001 - - how do I PAUSE (and variations, like how do I keep my console window open) 006 - - how do I clear the screen 009 - - how do I change the color of my text 013 - - how do I check if/wait until a key is pressed and/or read a single key without stopping the program 014 - - how do I delay (sleep) 046 - - how do I set/get the cursor position on the console Miscellaneous 018 - * how do I make my application use multiple languages 021 - - how do I play a sound; in the background; loop; stop it; etc. 025 - - how do I write an OS 026 - - how do I write the next big MMORPG (or any game at all) 027 - - anything about compression 036 - - how do I read a password; other stuff with passwords 040 - - how do I download files from the internet (programmatically, of course) 048 - - how do I switch on strings 053 - * troubles with verbose template error messages 065 - * how do I write encryption algorithms (everything from Caesar ciphers to the next AES) [advanced] 068 - - CLI/MFC/etc issues Not yet organized 058 - - how do I handle command-line arguments 059 - - any of the above in Linux or cross-platform [edit] Added numbers to suggestions for reference [edit2] I have begun to organize the items into sections. Some of the items will be listed more than once, sometimes in multiple sections. Whenever this happens, there is an asterisk (*) next to the name of the referring item. (The original has a dash.) Also, I think the Arrays, Strings, Sequences, etc. section needs some stuff about iterators, linked lists, etc. Newly added items in bold. | |
|
Last edited on
|
|
| Albatross (3449) | |
|
I think that out of those, the question we get the most of is how to make a game. It's usually asked by people first starting C++, and I usually tell them that they'll have to have years of experience in C++ before they'll be have the skills necessary to create a good (3D) game. 2D games somehow require a lot less skill, IMO. :) -Albatross | |
|
|
|
| ResidentBiscuit (971) | |
|
-How to sort this array? (Or any other sequential container) -Oh and what sort should be used? -How do I Google? ... Ok that one was a joke but I think a lot of these questions could be translated to that -Anything with overloading -Why not void main()? -Why this random obscure error? Oh yea I'm using bloodshed dev C++ -Anything about the process of linking and compiling -How do I get past programming console apps? -Writing my own encryption algorithm... -How come my floats never turn out right after 1000 calculations? Thats about all I can think of. Duoas up there took all the good ones :( | |
|
|
|
| Computergeek01 (2550) | |
|
I haven't looked at the FAQ in a while so I applogies for any duplicates, I'll look after posting this then come back and edit it. - What is a Calling Convention and why is it required before using certain functions\features of an API or library. - This one is not easy to do as an FAQ bullet but I think expalining what Main() or any other entry point like WinMain(...) and DLL_Main() is and what is expected of them from the compiler and the OS would save newer programmers some confusion. This one might be too platform dependent but I thought I would throw it out there. - In the Windows Forum I see a lot of confusion between C\C++ and C++\CLI, mostley about where one begins and the other ends. Maybe an entry explaining what the difference between C++ and C++\CLI are would be helpful. - An entry quickley explaining that Interprocess Communication and Remote Procedure Calls are API as well as platform specific in nature could help some users know where to look next. - A Dictionary of common but C\C++ and programming specific terms would be nice, that would even help me some of the time. - What is a Race Condition and how to avoid them through appropriate planning and design. EDIT More questions I see a lot: - How do I pass my array\stl container to a function? - What is the difference between a Compiler and an IDE? | |
|
Last edited on
|
|
| Luc Lieber (732) | |
|
Might be out of the scope of the FAQ, but a lot of people are having difficulty understanding how linking works when trying out a new library. I think that the fault falls on poor documentation on the library maintainers' end, but nevertheless someone needs to explain what the errors mean. It's an offsetting feeling when you follow a tutorial step-by-step, just to find out it's broken with the new library version that's been released. Having a working knowledge of how linking works would help alleviate some of the "Undefined Reference Syndrome" cases going around. * Also, how to make my program wait for X time units -- Infrequently Asked Questions -- * Also, what's the difference between runtime libraries again? MT, MTD, MD, MDD? * Also, what is make, and how can I build projects that use it on Windows? | |
|
Last edited on
|
|
| Null (754) | |
|
- what are differences between 32 bit and 64 bit applications? - something about structure packing - what's the difference between ++i and i++ ? | |
|
|
|
| Moschops (3721) | ||
Why do I need pointers?
| ||
|
Last edited on
|
||
| Duoas (6335) | |
| Should we number our suggestions so we can vote on the best candidates? | |
|
|
|
| L B (2739) | |
| There should definitely be a section on how to understand preprocessor, compiler, and linker errors. | |
|
|
|
| hamsterman (4227) | |
|
- why 1/2=0 and how to solve it. Maybe that is the same as Duoas's 57th though.. - confusion about pointers and arrays (including T (*)[N] and multidimensional arrays) My favourites so far are Duoas's 4, 8, 35 and 28 as I find myself spending a lot of time on them. Luckily there is http://cplusplus.com/articles/S3wTURfi/ (this one, I think, is a bit lacking) , http://cplusplus.com/articles/D9j2Nwbp/ and http://cplusplus.com/articles/Gw6AC542/ . I don't think I've seen anything about 8 though. Which brings up a point. Some of the topics that need to be covered already have articles about them. Maybe it would be a good idea to add links to them in the FAQ. | |
|
Last edited on
|
|
| CodeMonkey (623) | |||
Then have another possibly pinned at the top of the forums with the sort of How to do X Y Z type questions. The second one can be built mainly of links to articles that are relevant to the question. General questions about C++. What is the best book to learning C++? How long does it take to learn C++? Do I need to learn C before C++? It C++ a good choice as a first language? Does C++ have a future? Will you help me with my homework? Can I use C++ for…? | |||
|
Last edited on
|
|||
| moorecm (1732) | ||
How can I make a triangle/pyramid of asterisks (and a few other variations)?
| ||
|
|
||
| sloppy9 (401) | |
|
+1 hamsterman, those are definitely the most common problems I see. Beginner: How do I use something? Member: *links to the something reference* Beginner: I didn't know this site had a reference, thanks! Member: You're welcome! Beginner: Could I see an example?? Member: *banging head on desk* | |
|
|
|
| L B (2739) | |
| Don't all the references have examples?? | |
|
|
|
| Cubbi (720) | |
In the two months I've been on this forum so far, I've seen at least four order-of-evaluation questions (what is the result of n = n++; or n = ++n + n++; or cout << n << n++;)
| |
|
|
|
| Grey Wolf (2909) | |
| That looks like a lot of work, where do we get started? :0) | |
|
|
|
| Duoas (6335) | |
|
I think that the FAQ, if it is to be comprehensive, needs to be subdivided into logical sections, which should help the user narrow down his problem to the appropriate FAQ. I don't know yet how much work twicker wants to put into this... but we really should try to organize somewhat here before moving too much forward; the kind of work twicker will need to put into this will depend on its organizational needs. @ResidentBiscuit - overloading --> #41 - get past console apps --> #51 (but good phrasing, perhaps we should have it link to the same subject matter?) - writing one's own encryption algorithm might be a little too much for a FAQ, other than to say, "good luck" and "here are a few links to get you started". @Computergeek01 - CLI (etc) is not C++, so I'm not sure that the forum FAQ really needs address it (IMHO). Perhaps we could make a FAQ entry to explain that there are additional libraries that are designed around C and C++ and tightly integrated into IDEs, like CLI and MFC and the like... - IPC, RPC, and other platform-specific stuff seems me to better belong in an Article - Race Conditions likewise need an Article, since I don't think that anyone who doesn't understand why the program is misbehaving will be able to glean if from a list of FAQs... - array/container arguments --> #44 - Compiler vs IDE --> #63 @Luc Lieber - wait N units of time --> #14 - runtime libraries and linking issues --> #56 @Null - Can you explain what you mean by "issues with 32 and 64 bit applications"? Is this Article material or compiling/linking issues? @Moschops - Is "why do I need pointers" part of #23 or a separate issue? (Come to think about it, the tutorial is pretty good on presenting pointers and references, IIRC. Exactly what pointers issues do people have? [I typically ignore posts about them].) @L B - see #56 @hamsterman - 1/2=0 is not the same as #57, but it is of the same category. - What do you dislike about Zaita's article? (I'm not picking a fight here, just wondering.) I agree with the FAQ with links to Articles idea. @moorecm - Part of the purpose of those homeworks is to think about how to work with loops. I think it is a real disservice to give people answers on that. However, I do think it is a good idea to have something about working with spacing. (I've been thinking about an Article addressing it for a while. Alas for time.) @Grey Wolf Yaaay! Glad to see you back! :O) | |
|
|
|
| Computergeek01 (2550) | |
|
@ Duoas: - CLI: We all agree that C is not C++ either but we still get\answer questions about it. I actually broke down and started learning this for a bit and trust me, you won't see a difference without at least a few years experiance in both. After taking a compiled executable apart I got the impression that it's really C++ with training wheels. I think that pointing out some of the differences like you said would be a great thing to post on a new FAQ. - IPC\RPC: That is a very good point, I think I'll try my hand at that. @ Everyone: Regarding pointers, we can beat this dead horse until the end of time. The truth is that it just "clicks" for people. The idea is a little abstract but the tutorial here is a great resource (it's what taught me how to use them). Besides can you even cover pointers in a bulleted format like an FAQ? | |
|
Last edited on
|
|
| moorecm (1732) | |||
Homework problems are a significant amount of traffic here. They should perhaps be grouped in their own section somewhere. | |||
|
|
|||