std

  • C++ LNK2019 unresolved external symbol stdlib 2018-11-07

    I have a program that requires atol() in one of its functions. So I included stdlib.h but it doesn't seem to see it. EDIT: I'm aware to use it, I should include stdlib.h. I did that but I'm still getting this error. The function: void intstr( char *t

    Tags: std, unresolved external
  • Overload operator>> for std::pair 2018-09-24

    I am trying to use boost::lexical_cast on a std::pair<int, int>. #include <iostream> #include <utility> #include <boost/lexical_cast.hpp> namespace my { // When my_pair is a user defined type, this program compiles // and runs with

    Tags: boost, std, argument dependent lookup
  • How to find integer in container which stores pointers? 2016-12-22

    A container stores pointers to integers. I would like to find integer=66 using normal variable. When I am trying to do this by pointer it is ok. Code: #include <iostream> #include <algorithm> #include <vector> using namespace std; int ma

    Tags: algorithm, find, vector, std
  • specific gnuplot by data grouping

    specific gnuplot by data grouping 2016-06-13

    I'm new in gnuplot and sorry that my problem formulation might be unprecise, but I don't know how to find the tools/commnds needed to solve my problem. The code for plotting I would like to integrate in my bash file. I have a data set like: 285 1 50

    Tags: data, gnuplot, std, mean
  • Cross platform Event handling - std::condition_variable wait_for seems ignores timeout 2015-08-04

    I'm porting some code that uses native MS API and I've implemented something that tries to mimic event handling with CreateEvent, SetEvent, WaitForSingleObject, WaitForMultipleObjects, etc... I've used std::condition_variable as in my case it only ne

    Tags: c#, multithreading, synchronization, std
  • A vector of class objects, and their instantiation 2014-12-29

    Ok so i want a std::vector of class objects. They will be made on demand. std::vector<VertexBuffer> vBuffs; somwehere::someFunction() { VertexBuffer vB; thisNthat = 10; vB.thisNthat = thisNthat; ...... vBuffs.push_back(vB); } Since vB goes out

    Tags: class, object, vector, std
  • How can I get the sign-bit of a double? 2014-10-26

    What is the C# equivalent for C++ bool std::signbit( double arg ); The C++ reference description of this function is as follows: Determines if the given floating point number arg is negative. This function detects the sign bit of zeroes, infinities,

    Tags: double, std
  • Transferring the ownership of object from one unique_ptr to another unique_ptr in C++11? 2014-10-11

    In C++11 we can transfer the ownership of an object to another unique_ptr using std::move(). After the ownership transfer, the smart pointer that ceded the ownership becomes null and get() returns nullptr. std::unique_ptr<int> p1(new int(42));

    Tags: c++11, std, move semantics
  • Proper Way to size check a std::vector inside a loop 2014-08-27

    I have a std::vector that I need to loop through often. I see two ways of doing it First way: const size_t SIZE = myVec.size(); for (size_t i = 0; i < SIZE; i++) { myVec[i] = 0; } Second way: for (size_t i = 0; i < myVec.size(); i++) { myVec[i]

    Tags: stl, vector, c++11, std
  • best technique to erase from std::map multiple keys 2014-08-12

    Need to erase from std::map<unsigned int, SomeNullPointer*> some multiple keys. Before that operation we receive the keys from sqlite database and store them at other std::map, or std::list or any other std container. We are not allowed to eras

    Tags: sqlite, map, std
  • binary search a std:map 2014-05-31

    Using c++, if I have n integers in a std::map, is it possible to efficiently search the largest element that is smaller than k in std::map ? For example I have {1, 3, 5, 6} and k is 4 the returned value should be 3 I know std::map can search in log(n

    Tags: search, std
  • Using the find_if() function 2014-05-23

    I have a vector of structs say "v". I need to find a certain item of "v" whose ID matches a given id. I have found in another post that the way to go is "find_if". So I implemented the following: std::find_if(v.begin(), v.end(), MatchesID(id))!= v.en

    Tags: vector, std
  • to compare sub-items in vector 2014-03-05

    Overview of problem : I am using std::vector to hold objects of Subject. Now this vector contains lots of objects( with lots I mean 10-20 objects at max) . These objects have string member values like category and sub_category. Both category and sub_

    Tags: vector, std
  • Unexpected results when using a std::priority_queue of struct pointers 2014-01-08

    I'm sure that the code is pretty self-explicative, so I go straight to the point. Please ask for more details if the code is unclear. Foo.h ===== #include <iostream> class Foo { public: virtual ~Foo(){}; Foo(); Foo(const int b); bool operator

    Tags: c++11, priority queue, std, stdvector
  • C++ 11 bound std::function vs storing tuple and unpacking 2014-01-07

    First off, I am still relatively new to C++11, so if I am missing anything, pardon my oversight. So what I am trying to do is basically have caller pass in a function and arbitrary # of arguments for that function, store that off and then call it asy

    Tags: c++11, std, variadic templates
  • How to use GLM in Android using Cmake 2013-12-03

    I am trying to compile my OpenGL application in Android. I'm using [GLM library] (0.9.4)1 The compilation works until I include: #include <glm/glm.hpp> This header add cmath and linker complain about: cmath:102:11: error: '::acos' has not been

    Tags: std, android ndk, glm
  • How to erase items which are values of map 2013-10-17

    I have a map like this: std::map<unsigned,(string,timestamp)> themap. But I need to manage the size of the map by retaining only the highest 1000 timestamps in the map. I am wondering what is the most efficient way to handle this? Should I some

    Tags: std
  • Automated file rename - const variable is changing its value? 2013-07-05

    I'm kind of a noob with the std namespace, and I'm writing code that loops through all the jpeg files in a directory and removes any exclamation points. I'm trying to use std::string and std::vector. My problem is that my variable tempname: const cha

    Tags: winapi, string, variables, std
  • Forking a binary tree, fork functionality issue 2013-06-27

    Ok, So i've been looking this all over stackoverflow, and definitely googling for a good half an hour, but the answers I seem to get have barely anything to do with what I actually want to do, hopefully someone will help me on this one, heres the cod

    Tags: linux, tree, fork, std
  • Determine if std::string has all unique characters [C++] 2013-06-25

    I have what appears to be a really simple solution: void determineStringUnique(std::string str) { std::sort(str.begin(), str.end()); //sort characters std::unique(str.begin(), str.end()); //remove duplicate characters in a row (why we did std::sort r

    Tags: std

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 4.224 (s). 9 q(s)