添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I am a little lost on this project.

Can anyone help me interpret this error message?

Here’s my code:

gist.github.com

https://gist.github.com/codecademydev/8b3c616e95792058e27d2c5f509e1e64

whale.cpp
#include <iostream>
#include <vector>
#include <string>
int main() {
  // Whale, whale, whale
  // What have we got here?
  std::string input = "turpentine and turtles";
This file has been truncated. show original

g++ whale.cpp whale.cpp: In function ‘int main()’: whale.cpp:29:2: error: ‘whale_talk’ was not declared in this scope whale_talk.push_back(input[i]); ^~~~~~~~~~ whale.cpp: At global scope: whale.cpp:46:3: error: expected unqualified-id before ‘for’ for (int k = 0; k < whale_talk.size(); k++) { whale.cpp:46:19: error: ‘k’ does not name a type for (int k = 0; k < whale_talk.size(); k++) { whale.cpp:46:42: error: ‘k’ does not name a type ; k < whale_talk.size(); k++) { whale.cpp:51:8: error: ‘cout’ in namespace ‘std’ does not name a type std::cout << "\n"; In file included from whale.cpp:1:0: /usr/include/c++/7/iostream:61:18: note: ‘std::cout’ declared here extern ostream cout; /// Linked to standard output whale.cpp:52:1: error: expected declaration before ‘}’ token