小编MBZ*_*MBZ的帖子

ios_base.h中的C++错误

/usr/include/c++/4.4/bits/ios_base.h:在成员函数'std :: basic_ios>&std :: basic_ios> :: operator =(const std :: basic_ios>&)':
/usr/include/c ++/4.4/bits/ios_base.h:793:错误:'std :: ios_base&std :: ios_base :: operator =(const std :: ios_base&)'是私有的
/usr/include/c++/4.4/iosfwd:47:错误:在此上下文中
/usr/include/c++/4.4/iosfwd:在成员函数'std :: basic_ostream>&std :: basic_ostream> :: operator =(const std :: basic_ostream>&)':
/usr/include /c++/4.4/iosfwd:56:注意:合成方法'std :: basic_ios>&std :: basic_ios> :: operator =(const std :: basic_ios>&)'首先需要
/usr/include/c++/4.4/iosfwd:在成员函数'std :: basic_ofstream>&std :: basic_ofstream> :: operator =(const std ::)basic_ofstream>&)':
/usr/include/c++/4.4/iosfwd:84:注意:合成方法'std :: basic_ostream>&std :: basic_ostream> :: operator =(const std :: basic_ostream>&)'首先需要
/usr/include /c++/4.4/streambuf:在成员函数'std :: basic_filebuf>&std :: basic_filebuf> :: operator =(const std :: basic_filebuf>&)'中:/usr/include/c++/4.4/streambuf:778 …

c++ gcc

2
推荐指数
1
解决办法
9056
查看次数

使用现代IDE的小组的C++编码标准

我们将在我们的团队中开始一个新项目,该团队由不到10名开发人员组成.我们可以访问现代IDE,例如VS2010.

该项目非常动态(用户需求变化非常快)和跨平台.因此,我需要一个高度可读非常详细的 C++编码标准,以便新的开发人员可以在将来轻松更改旧代码.我还需要一个不写代码,所以代码将在不同的操作系统(至少是Windows和Linux)上编译.

  • 有这样的标准吗?
  • 编码标准已经过期了吗?

c++ coding-style

2
推荐指数
1
解决办法
1384
查看次数

从String中删除除字母表之外的所有内容

我想以有效的方式从给定的字符串中删除任何字符,但字母.有什么建议吗?

.net c# regex linq string

2
推荐指数
2
解决办法
1335
查看次数

深层复制对象

是否有可能深度复制Object开箱即用的?即clone手动编码功能的任何其他方式.

java copy object

2
推荐指数
1
解决办法
944
查看次数

C/C++中的数组初始化

这段代码初始化所有在所述阵列的元件的所有主要的C和C++编译器或不?

int arr[100] = {0};
Run Code Online (Sandbox Code Playgroud)

c c++

2
推荐指数
1
解决办法
239
查看次数

在蜂巢中排名()

我正在将SQL Server存储过程转换为HiveQL.

我怎样才能转换如下内容:

SELECT 
    p.FirstName, p.LastName,
    RANK() OVER (ORDER BY a.PostalCode) AS Rank
Run Code Online (Sandbox Code Playgroud)

sql-server hadoop hive

2
推荐指数
1
解决办法
8002
查看次数

我什么时候应该将一个循环转换为Linq语句?

我最近使用ReSharper启动.

ReSharper建议将所有循环转换为集合(通常foreach)转换为Linq语句,即使循环包含各种条件.

  • 这会改善性能吗?
  • 这是否使代码更具可读性?

一般来说,我什么时候应该遵循ReSharper这个问题的建议,什么时候不应该?

c# linq resharper loops

2
推荐指数
1
解决办法
2611
查看次数

为什么std :: get使用模板参数而不是常规参数?

std::get函数使用模板参数作为常规参数.
举个例子:

std::tuple <int, double, long &, const char *> bar(18, 6.5, 12, "Hello!");
cout << std::get<2>(bar); // Print the tuple’s third element.
Run Code Online (Sandbox Code Playgroud)

为什么这个功能是这样设计的?
为什么不使用常规参数呢?
例如,像:std::get(bar, 2)std::get(2, bar)

c++ templates

2
推荐指数
2
解决办法
91
查看次数

迭代shared_ptr <std :: vector <T >>

我们假设我有以下内容:

auto vec = std::shared_ptr<std::vector<T>>
Run Code Online (Sandbox Code Playgroud)

我想vec使用C++11基于范围的循环遍历所有实体.

以下作品:

for (auto entity: *vec)
Run Code Online (Sandbox Code Playgroud)

我的问题是在没有使用*运算符的情况下仍然这样做?

c++ shared-ptr c++11

2
推荐指数
1
解决办法
1551
查看次数

链接悬停时的预览页面

快速提问:

我可以在网页上的所有链接上启用网站预览吗?
即,当用户将鼠标移到页面中的任何链接上时,我想显示一个简单的弹出窗口,该页面将页面加载到链接中。

如果重要的话,我正在使用Asp.net

html asp.net popup hyperlink hover

2
推荐指数
1
解决办法
8984
查看次数

标签 统计

c++ ×5

c# ×2

linq ×2

.net ×1

asp.net ×1

c ×1

c++11 ×1

coding-style ×1

copy ×1

gcc ×1

hadoop ×1

hive ×1

hover ×1

html ×1

hyperlink ×1

java ×1

loops ×1

object ×1

popup ×1

regex ×1

resharper ×1

shared-ptr ×1

sql-server ×1

string ×1

templates ×1