Question about line.length();
does line.length(); include end line chars? For example Hello World How long would this be 11 or 12? ...
does line.length(); include end line chars? For example Hello World How long would this be 11 or 12? ...
I have these errors i could not fixed it: template< class char_type, class traits_type> class invalid_streambuf : public std::basic_streambuf< char_type, traits_type> { typedef std::basic_streambuf< char_type, traits_type> base_class; using typename base_class::int_type; ... virtual int_type overflow(int_type nChar) { return 0; ...
One of my internet connections is via a USB dongle. As well as accessing the internet I can use the SIM card contained inside to send SMS texts in the exact same fashion as a SIM card housed in my mobile phone. (I know, I really am a technical superhero...) Anyway, I wish to be able to send a message at a pre-determined time. The ab...
This are my code hope any kind souls will be kind enough to help me. Other Keys like Alphabets or Home or PgUp etc.. is working. Except for all the arrows. void AutoMove (HWND hWnd) { BOOL bWorked = FALSE; int value = 0; LPARAM lparam = (MapVirtualKey(0x025, 0) << 16) + 1; //Send to graphic screen HWND MSHWND = FindWindow ("MapleSto...
I would like to make an application that can be run directly from the computer. What I want to do Is allow employees to clock in and out through out the day. I want it to send the the time of check in/out to a remote database. I would like to make an .exe file and I would like for it to have a few input fields along with a field that let...
Edit: This issue only seems to happen with the combination of joint_view and shared_ptr. Raw pointers seem to work fine in the same scenario, as do shared pointers in a plain fusion container constructed w/ all its items at once, without adding anything more to it. Details below: I'm using mingw gcc 4.5.1 Running into a peculiar issue...
using template classes I usually make some typedefs like: typedef super<puper<complex<template<type> > > > simple_name I usually do it in 2 ways: template <class A, ...> struct Types { typedef ... } template <class A, ...> class Part_Of_Logick { public: typedef ... } Is it possible to set typedefs at the global sco...
I installed the boost package from cygwin and have a directory /usr/include/boost that includes a bunch of *.hpp files, including thread.hpp, which I need to include in the c++ file, via #include <boost/thread.hpp> Also, several *.a files seem to be related to boost::thread. $ ls /usr/lib/libboost_thread* -1 /usr/lib/libboost_thread-...
Hi, Im trying to copy an array to a vector, however, when the data is copied to the vector its different from that of the original array. int arraySize = 640000; std::vector<unsigned char> vector_buffer; unsigned char buffer[arraySize]; populateArray(&buffer); for(int i = 0; i < arraySize; i++) cout << buffer[i]; // this pri...
I am using a library of code from a tutorial for providing functionality for passing function points of non-static member functions to a function that expects a static function pointer, probably helps to know what I am suing, so here is the link http://www.codeproject.com/KB/cpp/thunk32.aspx This code uses the Boost library, which I have...
I just wondered what the best way is to get rid of the globally available static getInstance() in a Singleton. I do not want my Singleton classes being accessed from every point in my program. I thought about maybe having a create() public static function that creates one object and returns it but one cannot call this method twice. But...
Hi everybody, I'm wondering how to implement immutable data structures in C++ (or C). I'm searching for a book or paper (or a relatively simple and documented implementation) on the subject and I haven't managed to find one for now so I decided to ask for hints. Thanks in advance for your answers. ...
My boss wants a quick, simple to integrate, simple to host software licensing server to enforce license activations and expirations. We have to integrate it with a C++ Windows Service application. I would not like to host the service in our office for the same reason we don't host our own website in our office. The service must be host-...
Sometimes when coding with C++ templates, you want to prevent users from instantiating a specific specialization or set of specializations, because the result would be nonsensical. So you can define a (specific or partial) specialization whose definition, if instantiated, would cause a compiler error. The goal would be, if a user "misu...
Hi everyone! I looking for FAST library (the best with hardware acceleration) for manipulation on 2D graphic (load image, change value of pixels, change all R/G/B layer from one image to another, save, show effects). I work with Visual Studio 2008/2010 IDE, and programing in C++ so I need lib worked with that. I have experience with SD...
This is very basic but so: I want a string with 4 characteres: "abcd" how must I declare a new string, like that? char *newStr = new char[4]; // or -> char newStr[4]; strcpy(newStr, "abcd"); the null '\0' character must be on the size of the string, so new char[5]? ...
Are there C++ versions of PHP's fsockopen, fread, fwrite, fclose or anything similar? I'm using Windows (MFC) and TCP if that changes anything. ...
I'm trying to export some functionality from C# so I can use it in my unmanaged C++ app. On my test project, I first I create a C# DLL with a simple function to write a string to a file. I then use ildasm to turn this into an intermediate language (.il file). The function in .il looks like so: // =============== CLASS MEMBERS DECL...
I'm creating a library in C++. It links against Windows libraries on Windows and Linux libraries on Linux. It's abstracted, all is well. However, is it feasible to dynamically detect, load and use libraries (and copying header files for use) so it could be used on any platform if it was running under LLVM JIT? ...
Hello all, Given a C++ string str("ab"), how do I swap the content of str so that it becomes "ba". Here is my code: string tmpStr("ab"); const char& tmpChar = tmpStr[0]; tmpStr[0] = tmpStr[1]; tmpStr[1] = tmpChar; Is there a better way? Thank you ...