Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 04:03

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C++ Frage

Discussion on C++ Frage within the C/C++ forum part of the Coders Den category.

Reply
 
Old 03/29/2013, 00:37   #16

 
Delinquenz's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,160
Received Thanks: 232
Quote:
Wenn du mit den Videos nicht zurechtkommst: Deine Sache. Der TE kann ja entscheiden, wie er will, ich habe mir die komplette Sprache jedenfalls durch Tutorials angeeignet und habe bisher noch keine defizite bei schwierigen C++ Fragen feststellen können.
Die komplette Sprache? Dann habe ich hier einige Fragen. (nicht selbst verfasst, finde die Quelle grad nicht) Glaube die waren von nem Personaler, der C++ Programmierer einstellt. Bevor jetzt Flames kommen: ich bin selbst nicht in der Lage, alles zu beantworten.

Quote:
How many ways are there to initialize a primitive data type in C++ and what are they?
Why should you declare a destructor as virtual?
What does it mean that C++ supports overloading?
What are examples of overloading in C++?
What is name mangling in C++ and why is it used?
What is an abstract base class?
What is RTTI?
How can you access a variable that is “hidden” by another variable of the same name?
What is a namespace and how is it used.
What are the differences between a class and a struct in C++, and how does this compare to C?
What are templates? How are they used?
What is a copy constructor and when is it used, especially in comparison to the equal operator.
What is the difference between a “shallow” and a “deep” copy?
What is the const operator and how is it used?
What are the differences between passing by reference, passing by value, and passing by pointer in C++?
When is it and when is it not a good idea to return a value by reference in C++?
What is the difference between a variable created on the stack and one created on the heap?
How do you free memory allocated dynamically for an array? What are the implications of just using delete?
What is multiple inheritance? When should it be used?
What is a pure virtual function?
What does the keyword mutable do?
What does the keyword volatile do?
What is the STL?
What is a Vector?
What is contained in the <algorithms> header?
What is the difference between #include <iostream.h> and #include <iostream>?
What’s the difference between “++i” and “i++”?
What is short circuit evaluation? How can it be used? Why can is be dangerous?
What is the ‘,’ operator?
What is the only ternary operator? How is it used?
What is the use of a const member function and how can it be used?
How is try/catch used in C++?
Why should you never throw an exception in a destructor?
What is the explicit keyword?
What is the proper way to perform a cast in C++?
What does inline do?
Du beherrscht noch lange keine komplette Sprache nur weil du dir eine Tutorialreihe fertig angeschaut hast oder ein Buch durchgelesen hast.
Delinquenz is offline  
Old 03/29/2013, 02:12   #17
 
Dr. Coxxy's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 1,206
Received Thanks: 736
Quote:
1. How many ways are there to initialize a primitive data type in C++ and what are they?
2. Why should you declare a destructor as virtual?
3. What does it mean that C++ supports overloading?
4. What are examples of overloading in C++?
5. What is name mangling in C++ and why is it used?
6. What is an abstract base class?
7. What is RTTI?
8. How can you access a variable that is “hidden” by another variable of the same name?
9. What is a namespace and how is it used.
10. What are the differences between a class and a struct in C++, and how does this compare to C?
11. What are templates? How are they used?
12. What is a copy constructor and when is it used, especially in comparison to the equal operator.
13. What is the difference between a “shallow” and a “deep” copy?
14. What is the const operator and how is it used?
15. What are the differences between passing by reference, passing by value, and passing by pointer in C++?
16. When is it and when is it not a good idea to return a value by reference in C++?
17. What is the difference between a variable created on the stack and one created on the heap?
18. How do you free memory allocated dynamically for an array? What are the implications of just using delete?
19. What is multiple inheritance? When should it be used?
20. What is a pure virtual function?
21. What does the keyword mutable do?
22. What does the keyword volatile do?
23. What is the STL?
24. What is a Vector?
25. What is contained in the <algorithms> header?
26. What is the difference between #include <iostream.h> and #include <iostream>?
27. What’s the difference between “++i” and “i++”?
28. What is short circuit evaluation? How can it be used? Why can is be dangerous?
29. What is the ‘,’ operator?
30. What is the only ternary operator? How is it used?
31. What is the use of a const member function and how can it be used?
32. How is try/catch used in C++?
33. Why should you never throw an exception in a destructor?
34. What is the explicit keyword?
35. What is the proper way to perform a cast in C++?
36. What does inline do?
seh da jetzt nix uberlike (eben in 10 min zusammengetippt, für ungenauigkeiten wird net gehaftet...):
Code:
1.:
'=', '()', '{}' und eigtl auch garnix.
2.:
wenn eine abgeleitete klasse extra aufräumarbeiten erledigen müsste.
3.:
überladen von funktionen und operatoren.
4.:
void blubb();
void blubb(int);
void blubb(int, double);
float operator*(Vector, Vector);
5.:
https://en.wikipedia.org/wiki/Name_mangling
6.:
eine basisklasse von der man ableiten kann, aber kein objekt von erstellen kann.
7.:
Runtime type information - typinformationen zur laufzeit -> dynamic_cast
8.:
mit dem :: operator kommt man an globale ran, ansonsten gehts glaub ich nicht.
EDIT: wenn damit klassenmember gemeint sein sollten - fick dich ins knie, frage umformulieren, da gehts.
9.:
was soll man dazu sagen - kann man zusammengehörige dinge in einen namespace packen.
10.:
structs sind in c++ klassen in denen alle member public sind.
in c sind structs structs.
11.:
"schablonen" für funktionen/klassen, wurde in c desöfteren über makros gelöst.
12.:
https://de.wikipedia.org/wiki/Kopierkonstruktor
13.:
steht auch im obigen link. eine kopiert z.b. pointer einfach nur so, während eine "tiefe" kopie auch den inhalt des pointers neu anlegt.
14.:
sichert zu, dass const variablen nicht verändert werden.
15.:
void blubb1(int& a);
void blubb2(int a);
void blubb3(int* a);

int asdf = 5;
blubb1(asdf); // in wirklichkeit wird &asdf übergeben -> push asdf
blubb2(asdf); // -> push [asdf]
blubb3(&asdf); // -> push asdf
16.:
was soll man hier sagen, große objekte sollte man per referenz returnen, wenn möglich, dass man lokale objekte nicht als referenz zurückgeben kann sollte klar sein.
17.:
eine liegt aufm stack, andere aufm heap, was soll man dazu sagen?!?
lokale variablen, parameter -> stack, new/malloc -> heap.
18.:
delete[]; Zweite frage verstehe ich nicht, wenn man nur delete benutzt ist das weitere verhalten vermutlich undefiniert.
19.:
Mehrfachvererbung - benutzen, wenn es logisch und direkt verständlich ist.
20.:
virtual void blubb() = 0;
21.:
var darf auch aus const funktionen verändert werden.
22.:
eine variable kann außerhalb des für den compiler sichtbaren bereich verändert werden, soll also von eventuellen compileroptimierungen ausgenommen werden.
z.B. kann hardware direkt auf diese variable zugreifen.
23.:
Standard Template Library - ursprung der c++-standardbibliothek, ist aber afaik nicht i-wie normiert, oder?
24.:
Ein punkt im 3dimensionalen raum - ne scherz, die c++ stl implementierung eines arrays ;)
25.:
denke mal <algorithm> ist damit gemeint, jede menge templates für algorithmen...:
http://www.cplusplus.com/reference/algorithm/
26.:
hat i-was mit den standards zu tun, vergessen, google spuckt das hier aus:
http://members.gamedev.net/sicrane/articles/iostream.html
27.:
vorher inkrementieren, dann auswerten - vorher auswerten, dann inkrementieren.
28.:
optimierung, wenn erkannt wird, dass ein operand nicht mehr ausgewertet werden muss.
if (false && blubb())
 // ...
blubb() wird nie ausgeführt werden, ist nicht gefährlich, wenn man weiß, dass es sie gibt.
29.:
der komma operator... z.b. in for schleifen öfters mal benutzt.
30.:
"? :" kurzform von if then else.
31.:
zeigt an, dass es nichts im objekt ändert (außer siehe blabla oben mutable).
32.:
exceptions
33.:
kann memory leaks erzeugen.
34.:
verbietet implizite konvertierungen.
35.:
mit klammern: (int) !!!!11111einself (sry, langsam wirds mir zu blöd).
36.:
nix, ignoriert der compiler eh.
tipp für den compiler, dass er die funktion doch bittebittebitte inlinen soll :-(
Dr. Coxxy is offline  
Old 03/29/2013, 02:15   #18

 
Delinquenz's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,160
Received Thanks: 232
Quote:
seh da jetzt nix uberlike (eben in 10 min zusammengetippt, für ungenauigkeiten wird net gehaftet...):
Deine C++ Kenntnisse habe ich auch nicht angezweifelt. Deinem Post nach zu urteilen hast du selbst mit einem Buch gelernt und behauptest auch nicht, die komplette Sprache zu können.
Delinquenz is offline  
Reply


Similar Threads Similar Threads
Frage zu Bot machen-Maus Frage-Button Frage
02/16/2012 - AutoIt - 10 Replies
Hallo, Elitepvpers hat echt für alles ein Ort :D Geil. Also...Bin AutoIt anfänger. Ich bin dabei ein Bot für das Online Game Runescape zu machen. Ich hette 2 Fragen(FÜR DEN MOMMENT :) ): Kann ich machen das AutoIt inaktiv die Maus benutzt,also werend der Bot läuft das ich bzw. man im Internet surft oder was anderes macht`?



All times are GMT +1. The time now is 04:04.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.