Questions tagged [standard-library]

The standard library contains core utilities provided by all implementations of the language.

The standard library contains core utilities provided by all implementations of the language.

The size and scope of the standard library varies between languages, some provide only a few basic components for such things as string handling and I/O, whereas others provide higher-level tools for a wide variety of tasks such as XML processing, networking and database access.

For questions about specific languages' standard libraries use this tag in conjunction with the tag for the language, or use the indicated tags for these languages:

677 questions
0
votes
5 answers

std::vector overwriting final value, rather than growing?

I'm having an issue where using vector.push_back(value) is overwriting the final value, rather than appending to the end. Why might this happen? I have a sample item in the vector, so it's size never hits zero. Below is the code.. void…
Mark
  • 6,123
  • 13
  • 41
  • 52
0
votes
4 answers

Why doesn’t std::map provide key_iterator and value_iterator?

I am working in a C++03 environment, and applying a function to every key of a map is a lot of code: const std::map::const_iterator end = m_map.end(); for (std::map::const_iterator element = m_map.begin(); element != end; ++element) { …
qdii
  • 12,505
  • 10
  • 59
  • 116
0
votes
2 answers

Using code from standard library to stop output from exiting in Turbo C++

Many of folks here are telling me to stop using clrscr(), getch() etc. and I have started learning C++ with the standard library and now that I want to follow the standard library how would I stop the output from immediate exit after run? include…
Aesthetic
  • 763
  • 1
  • 14
  • 31
0
votes
2 answers

Python function for boolean "and" operator?

I'm suprised not to find the boolean (not bitwise) and operator in the operator module: http://docs.python.org/2/library/operator.html Why is that so? Is there a workaround?
static_rtti
  • 53,760
  • 47
  • 136
  • 192
0
votes
1 answer

Searching for file in current directory with particular extension in C

Is there any function in a standard C library which allow one to retrieve files with a particular extension like ".c"?
Shahzad
  • 1,999
  • 6
  • 35
  • 44
0
votes
1 answer

Can't choose libc++ or libstdc++ in XCode

I am trying to build a project in XCode which uses both Cinder and OpenSubdiv. They conflict in many ways and I have solved most problems but the last one is giving me a headache. I have a linker error: "Undefined symbols for architecture x86_64:…
DaleyPaley
  • 201
  • 2
  • 11
0
votes
2 answers

Are Custom Libraries Unprofessional?

I'm still in university at the moment, and I'll likely either try to get security or programming job. My first programming course used a custom library that came with the book. It replaced and added many of the basics of Java like Arrays, completely…
rice2007
  • 115
  • 12
0
votes
2 answers

Comparing a c++ std::vector's elements with each other

I have a std::vector of double values. Now I need to know if two succeeding elements are within a certain distance in order to process them. I have sorted the vector previously with std::sort. I have thought about a solution to determine these…
BlackMamba
  • 1,449
  • 2
  • 12
  • 18
0
votes
1 answer

Use the standard "overwrite" dialog with custom information

I am writing a utility copying files to/from remote drives (eg SkyDrive). When I'm about to overwrite a file, I pop up a regular "file exists, do you want to overwrite Y/N" message box; is it possible to use the standard Windows file overwrite…
Marcel Popescu
  • 3,146
  • 3
  • 35
  • 42
0
votes
0 answers

Is there a way to block some parts of the Java Standard Library?

I am creating an application that allows people to load in their Java applications. Is there a way to disable parts of the Java Standard Library like JFrames and Files? Preferably when a user tries to access these parts it should throw an exception.…
Jeroen
  • 15,257
  • 12
  • 59
  • 102
0
votes
3 answers

C++ Mutex and Function Arguments

Question Motivation I am using mutexes to protect some variables in a function which is the entry point of a set of threads. I think the mutex will protect the variables which are in the same scope, but will it protect the function arguments?…
FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225
0
votes
0 answers

Finding the library that defines a given C function

On a Linux distribution (e.g. Debian) how does one find the static library or shared object that defines a given function (e.g. printf)? Is some variation of (first using ldd from a given executable that uses that function and then using something…
Kedar Mhaswade
  • 4,535
  • 2
  • 25
  • 34
0
votes
2 answers

ECMAScript Regex for a multilined string

I am writing the loading procedure for my application and it involves reading data from a file and creating an appropriate object with appropriate properties. The file consists of sequential entries (separated by a newline) in the following…
Thomas Russell
  • 5,870
  • 4
  • 33
  • 68
0
votes
2 answers

A full list of special double-underscore properties in standard python libraries?

Would anyone have a list of special python properties that begin and end with a double underscore with a brief explanation of their functionality? Something along the following lines: { "__slots__": "an iterable that restricts a set of…
p3t3
  • 123
  • 1
  • 7
0
votes
1 answer

C++ Sys/Stat.h has an error?

I'm trying to create a cross-platform program. I just created a class and made a function which gets the path of the current user. I wanted to use that path later. But somehow I get these errors : "/usr/include/x86_64-linux-gnu/sys/stat.h:-1: In…