Author Topic: noob problems  (Read 2218 times)

Offline AidanSana

  • Single posting newcomer
  • *
  • Posts: 4
noob problems
« on: March 05, 2015, 09:35:48 pm »
Hello everyone. I just started studying C++ and am having troubles with CodeBlocks. It was working fine for me at first but now every time I try to build a new program it keeps asking me over and over again if I want to build it when I click yes. When I click no it just returns a bunch of random numbers. Here is the code I'm using.

// listing 2.2 using std::cout
#include <iostream>
int main()
{
std::cout << "Hello there. \";
std::cout << "Here is 5: " << 5 << "\n";
std::cout << "The manipulator std::endl ";
std::cout << "Writes a new line to the screen.";
std::cout << std:: endl;
std::cout << "Here is a very big number:\t" << 70000;
std::cout << std::endl;
std::cout << "Here is the sum of 8 and 5:\t";
std::cout << 8+5 << std::endl;
std::cout << "here's a fraction:\t\t";;
std::cout << (float 5/8 << std::endl;
std::cout << "And a very very big number: \t";
std::cout << (double) 7000 * 7000 << std::endl:
std::cout << "Don't forget to replace Jesse Liberty ";
std::cout << "With your name...\n";
std::cout << "Jesse Liberty is a C++ programmer!\n";
return 0;
}

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6483
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AidanSana

  • Single posting newcomer
  • *
  • Posts: 4
Re: noob problems
« Reply #2 on: March 05, 2015, 10:15:23 pm »
-------------- Run: Debug in 4 (compiler: GNU GCC Compiler)---------------

Checking for existence: C:\Users\Stephen\Work\4\bin\Debug\4.exe
Executing: "C:\Program Files (x86)\CodeBlocks/cb_console_runner.exe" "C:\Users\Stephen\Work\4\bin\Debug\4.exe"  (in C:\Users\Stephen\Work\4\.)
Process terminated with status -1073741510 (0 minute(s), 4 second(s))

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: noob problems
« Reply #3 on: March 05, 2015, 10:39:22 pm »
-------------- Run: Debug in 4 (compiler: GNU GCC Compiler)---------------

Checking for existence: C:\Users\Stephen\Work\4\bin\Debug\4.exe
Executing: "C:\Program Files (x86)\CodeBlocks/cb_console_runner.exe" "C:\Users\Stephen\Work\4\bin\Debug\4.exe"  (in C:\Users\Stephen\Work\4\.)
Process terminated with status -1073741510 (0 minute(s), 4 second(s))

Please do what the link Tim posted says:
Quote from: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Do a re-build instead of build in order to get a full build log.
Just rebuild (or lean and build), do not (yet) run and copy and paste the content of the build-log.

Offline AidanSana

  • Single posting newcomer
  • *
  • Posts: 4
Re: noob problems
« Reply #4 on: March 05, 2015, 10:54:21 pm »
ok this is what I got now

mingw32-g++.exe -Wall -fexceptions -g  -c E:\Programs\3.cpp -o obj\Debug\E\Programs\3.o
E:\Programs\3.cpp:5:14: warning: missing terminating " character [enabled by default]
E:\Programs\3.cpp:5:1: error: missing terminating " character
E:\Programs\3.cpp: In function 'int main()':
E:\Programs\3.cpp:15:15: error: expected primary-expression before 'float'
E:\Programs\3.cpp:15:15: error: expected ')' before 'float'
E:\Programs\3.cpp:17:47: error: found ':' in nested-name-specifier, expected '::'
E:\Programs\3.cpp:17:43: error: 'std::endl' is not a class or namespace

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: noob problems
« Reply #5 on: March 05, 2015, 11:06:49 pm »
What about fixing your code ?
The error-messages are quiet clear.

Offline AidanSana

  • Single posting newcomer
  • *
  • Posts: 4
Re: noob problems
« Reply #6 on: March 05, 2015, 11:26:37 pm »
Wow I really should of checked my typing. I thought I had copied it exactly as it was in the book. Thank you.