Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22237

I can't step into std::string source code

$
0
0

I have s simple code like this, I want to know the implementation of std::string, so I use the GDB and want to step into the source code, but failed. But step into std::map(or std::set) success.

#include <string>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string>#include <map>int main(){    std::string str;    std::map<int, int> myMap;    printf("sizeof empty string is %lu, size is %lu\n", sizeof(str), str.size());    std::string str1("abcdefghijklmnopqrstuvwxyz1234567890");    printf("sizeof string is %lu, size is %lu\n", sizeof(str), str1.size());    return 0;}

enter image description here


Viewing all articles
Browse latest Browse all 22237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>