by: Sergey Tursanov |
last post by:
Hello all !
When I use code below and check my program with various memory
leak detection tools I get message about memory leaks in stl_alloc.h.
#include <string>
int main()
{
std::string s...
|
by: Angus Leeming |
last post by:
Hello,
Could someone explain to me why the Standard conveners chose to typedef
std::string rather than derive it from std::basic_string<char, ...>?
The result of course is that it is...
|
by: Axel |
last post by:
Hiho,
how can I reserve enough memory for a long string? I tried with
max_size() but 4GB is to much for my system, an exception ist the
result. And I'm getting an exception too when using the...
|
by: Bryan Bullard |
last post by:
#include <cstring>
#include <iostream>
#include <string>
std::string foo()
{
char buf;
strcpy(buf, "this is a test.");
|
by: Christopher Benson-Manica |
last post by:
Let's say I have a std::string, and I want to replace all the ','
characters with " or ", i.e. "A,B,C" -> "A or B or C". Is the
following the best way to do it?
int idx;
while(...
|
by: Jason Heyes |
last post by:
Does this function need to call eof after the while-loop to be correct?
bool read_file(std::string name, std::string &s)
{
std::ifstream in(name.c_str());
if (!in.is_open())
return false;
...
|
by: Erik Wikström |
last post by:
First of all, forgive me if this is the wrong place to ask this question,
if it's a stupid question (it's my second week with C++), or if this is
answered some place else (I've searched but not...
|
by: vidya.bhagwath |
last post by:
Hello Experts,
I am using std::string object as a member variable in one of the my
class. The same class member function operates on the std::string
object and it appends some string to that...
|
by: gabriel.becedillas |
last post by:
I have a lot of functions returning "const std::string&". Every time I
wrap one of those I have to do it like this:
class_.def("name", &someclass::bla,...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|