小编Eth*_*han的帖子

错误:无法为数组指定显式初始化程序

我正在使用Visual Studios 2013,我一直收到这个错误,但我不明白为什么.

class CLI{
    string commands[2] = {"create", "login"};
public:
    void addCommand(), start(), getCommand(string);
};
Run Code Online (Sandbox Code Playgroud)

错误:

error C2536: 'CLI::CLI::commands': cannot specify explicit initializer for arrays
Run Code Online (Sandbox Code Playgroud)

c++ arrays c++11 visual-studio-2013

8
推荐指数
1
解决办法
9429
查看次数

改变Bootstrap Jumbotron的h1颜色

对Bootstrap很新,并开始玩它.但有一件事(应该非常明显)我无法开始工作.这就是改变了jumbotron中h1标签的颜色.

HTML代码:

<!DOCTYPE html>
<html>
<head>
    <title>Hello WWW</title>
    <link rel="stylesheet" href="main.css">

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> 
</head>

<body>
    <div class="jumbotron">
        <h1>Progression of Connected Computing</h1>
        <p>Learn more about the internet</p>
    </div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

main.css代码:

.jumbotron h1{
    color: #fff;
}

.jumbotron p{
    color: #fff;
}
Run Code Online (Sandbox Code Playgroud)

问题是,p标签是否正确更改并变为白色,但由于某种原因,h1标签没有?可能是我正在做的傻事,但我似乎无法弄清楚它是什么.谢谢!

html css twitter-bootstrap

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

标签 统计

arrays ×1

c++ ×1

c++11 ×1

css ×1

html ×1

twitter-bootstrap ×1

visual-studio-2013 ×1