cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Is there any function to see all member
Is there any function to see all member varibales and functions of a library class in C++
Oct 30, 2017 at 5:44pm UTC
kapil2905
(146)
Hi ppl :)
Is there any way to print available member variables and functions for C++ inbuilt classes, like string and vector.
Something like dir(str) in python.
Thanks for any help :)
Oct 30, 2017 at 5:52pm UTC
helios
(17506)
No, not unless the class or library specifically has that functionality.
Oct 30, 2017 at 6:12pm UTC
kapil2905
(146)
Thanks @helios for this info :)
Oct 31, 2017 at 1:29pm UTC
jonnin
(11333)
no but the web has this on multiple sites, including this one.
I am not 100% sure but man command used to work in unix for most statements. I haven't tried this in a long while.
Oct 31, 2017 at 2:28pm UTC
keskiverto
(10365)
Reference documentation for C++ Standard Library is a very good thing.
For comparison, I did create
foo.cpp
1
2
#include <vector>
int
main() {}
and compiled with:
g++ -E foo.cpp
This does not actually compile, just preprocess. "Easier" than following all the #includes manually.
The output had 5554 lines ...
Topic archived. No new replies allowed.