General C++ Programming - May 2020 (Page 6)

When to use const char * over std::string?
 
When should you use const char * over std::string ?
[9 replies] Last: Another case are dynamic link libraries that may be consumed by other... (by kbw)
D.exe not found
 
I created an empty project called "D" for c++. I just do the basic hello world program and it works ...
[6 replies] Last: Thx guys (by MrRobot)
by tsuraj
use of if else
 
the code run,there is no error but the output is else condition whenever input character are ent...
[5 replies] Last: You need to fully understand what was said above, but basic conditiona... (by jonnin)
Reference to one of many objects
 
I have several different objects, each with a common base class. Id like to create a base-class ref...
[5 replies] Last: I can't use an array as each object is a different class, though all i... (by PhysicsSteve)
Function declaration best-practice?
 
Let's say I'm developing a logging functionality. Inside `logging.h` I declare the function to be us...
[3 replies] Last: I have somewhat different suggestion: 1. Users of your logging interf... (by malibor)
by dkg123
the good ol EXPECTED unqualified ID before 'public'
 
this error has my program completely hung code in q: #include <iostream> #include <string>...
[6 replies] Last: Please fix the "wack indentations" and remove most of those "wack doub... (by jlb)
STL
 
I am a bit stuck on this question for my assignment int find_first(list<string>& data, string que...
[3 replies] Last: yes, you need to return a container (any type) of all the indices. i... (by jonnin)
General parser - Error handling
 
Hello everybody, I'm writing my own general parser. I know many will ask me why? The reason is si...
[5 replies] Last: To start, you need to store the line and position number with the cur... (by AngeSurTerre)
Tips and examples for Movie Inventory
 
So currently I'm doing a final project for my C++ course, this time it's a bit more open-ended. Thin...
[14 replies] Last: #include <iostream> #include<string> #include<vector> #include<except... (by Kitsunetsuki)
C++ Is Faster and Safer Than Rust: Benchmarked by Yandex
 
This article continues a good tradition of busting myths about the Rust language shared by some big-...
[1 reply] : Are these just pvs-studio plugs? (by kbw)
Having wierd problem ASAP help please :)
 
Hello, I am trying to create vector of a class on another class. now i did created vector of diff...
[4 replies] Last: The problem is that gameState.h includes Addons.h and Addons.h include... (by dutch)
How do compilers manage a dynamic type in a static
 
How do compilers manage a dynamic user-defined (eg. string) type in a static array type. How to per...
[1 reply] : What do you think the problem is? The string data does not need to fit... (by dutch)
STL map container
 
I currently have this ode but I am not sure how to do the following question. #include <lis...
[4 replies] Last: The link has: map<char,string> mymap; mymap['a'] = "an element"; Le... (by keskiverto)
What is an iterator in general?
 
An iterator is an abstraction, everything that behaves like an iterator is an iterator. In std::vect...
[5 replies] Last: @Cubbi Ah yes indeed!, increment/decrement is not the same as with pl... (by malibor)
C++ “delete” used in comma separated multiple array name
 
Is it valid to use single C++ “delete” in comma separated multiple array name, e.g. delete o...
[15 replies] Last: I really do not like that evaluation order is undefined for subexpres... (by dhayden)
I want to Inset element in array
 
I am using a sample program to insert element in array and it work all the way to the number to inse...
[1 reply] : for(i=5;i>=pos;i--) a[i+1]=a ; In the first 2 for loops you knew that... (by Thomas1965)
Pointer and Reference
 
Reference are the constant constant pointer, Unlike pointer Reference can not initialize with NULL....
[3 replies] Last: That makes sense. But the post must've been removed through reporting ... (by dutch)
Issue with C++
 
Morning, i have a problem with C++, i finished my algorithm and the following massage appeared: u...
[6 replies] Last: Thanks you all, but it was vey simple, i puted a space between "int" a... (by CancerJack)
by Zero3K
Compilation errors are occurring when compiling a driver
 
Can someone help me fix them? The errors are in the paste located at https://paste.ee/p/husrG . They...
[3 replies] Last: Also, look at http://www.cplusplus.com/forum/general/270305/ for anoth... (by Zero3K)
My 1 month projects - asking for tips and ways to improve
 
*I posted this 2days ago in begginers topic but i got no comments or attention so i thought maybe it...
[11 replies] Last: void AssetsManager::loadTexture(string name, string path) Passing st... (by Thomas1965)
May 2020 Pages: 1... 456789
  Archived months: [apr2020] [jun2020]

This is an archived page. To post a new message, go to the current page.