C++ School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C++ Expert!

Join 300,494 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,870 people online right now. Registration is fast and FREE... Join Now!




Problem with Code::Blocks

 

Problem with Code::Blocks, The program only seems to work once...

Bloodsong

3 Jul, 2009 - 01:36 PM
Post #1

New D.I.C Head
*

Joined: 13 Jun, 2009
Posts: 2

Hi All,

I just started trying to teach myself C++ and Python as a way to kill time without spending money, so this is probably a question that will just be basic as hell.

I recently started teaching myself C++ with tutorials from www.cprogramming.com As part of the Getting Started tutorial, there were step by step instructions for installing Code::Blocks. I follow the instructions, start the program, and write the "Hello World" program, compile and run, all is fine. I close the program out and try to continue the next day.

I restart Code::Blocks, open the previously saved project, ask it to add new file, and try to make a new text output file, exactly the same as the successful "Hello World", only with a different string. I try to compile, and get the error telling me that the very first line is not valid. The line in question is:
CODE
#include <iostream>


Any ideas on why this is happening?

Tommie

User is offlineProfile CardPM
+Quote Post


deery5000

RE: Problem With Code::Blocks

5 Jul, 2009 - 04:26 AM
Post #2

D.I.C Regular
***

Joined: 9 May, 2009
Posts: 353



Thanked: 20 times
My Contributions
when u say "add a new file" do u mean a new .cpp file?

kevin

ive no experiece with using code blocks, i use visual studio 2005 / 2008
but im sure this is something small

This post has been edited by deery5000: 5 Jul, 2009 - 04:28 AM
User is offlineProfile CardPM
+Quote Post

apw5020

RE: Problem With Code::Blocks

5 Jul, 2009 - 04:45 AM
Post #3

D.I.C Addict
****

Joined: 26 Mar, 2009
Posts: 576



Thanked: 58 times
My Contributions
Can you post the program and your errors? I, personally, would rather use VS Express.
User is offlineProfile CardPM
+Quote Post

Calix_

RE: Problem With Code::Blocks

5 Jul, 2009 - 10:55 AM
Post #4

New D.I.C Head
*

Joined: 5 Jul, 2009
Posts: 7


My Contributions
try and add these before hand in codeblocks:

CODE

#include <cstdio>

#include <cstdlib>

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 11/8/09 04:44AM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month