Welcome! Log In Create A New Profile

Advanced

Activity 1.a Hello world

Posted by Renate 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Activity 1.a Hello world
February 12, 2009 10:55AM
Yes, I must be a dumass for not being able to do the first activityyawning smiley

Could someone please tell me why it doesn't display "Hello world" even though I entered the code exactly as the study guide instructed?

Help would be awesome.....
avatar Re: Activity 1.a Hello world
February 12, 2009 11:16AM
In Dev C++ ..on the file menu ... click on Tools >> Environment Options ...make sure that the check box "Console window remains open" is checked !
Let me know ...smile
avatar Re: Activity 1.a Hello world
February 12, 2009 11:32AM
Nope...

The checkbox was already checked.
Any other ideas?
avatar Re: Activity 1.a Hello world
February 12, 2009 11:37AM
Post the exact filename (something.cpp) that you saved for this program ..... (waiting)eye rolling smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 11:58AM
My reason for asking ? Well C++ doesn't like spaces in the filename ...
Try the following ...
Save the following code as Hello. World.cpp and try running the program
Language: C++
//Displays Hello World #include <iostream> using namespace std;   int main() { cout << "Hello world!" << endl;   return 0; }

Go to the path where the file is stored on your harddrive ( either C:\unisa\devcpp OR C:\unisa) and rename Hello. World.cpp to HelloWorld.cpp
Open the file that you just renamed and run the program ...provided you have done what i said in my first posting on this topic and provided you told the compiler where to look
for the binaries and libraries in needs to compile your program(and any other program) -- > check this by navigating to Tools>>Compiler Options .. click on Directories and check whether Binaries, Libraries, C Includes are filled in AND THAT THERE IS NOTHING IN C++ includes...
If the above tabs are not filled in then you have to insert it ..the default path for Binaries is C:\unisa\mingw\bin .. for Libraries it is C:\unisa\mingw\lib and for C Include it is C:\unisa\mingw\include

If (after having done all of the above) your console window still doesn't want to appear ...inform me and wait for my next posting !! grinning smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 12:03PM
The exact filename is act1.a.cpp.

Perhaps it would be a problem that there are spaces in the folder names?
avatar Re: Activity 1.a Hello world
February 12, 2009 12:09PM
Yip !! That's the problem you're experiencing at present ...no spaces in folder names... i've tested it !!
Good one for all to note , Renatethumbs up
avatar Re: Activity 1.a Hello world
February 12, 2009 12:12PM
I re-entered and rechecked the settings you mentioned above...
Still no result
avatar Re: Activity 1.a Hello world
February 12, 2009 12:13PM
Lol... Now I have to stop saving in "My Documents".. 456
avatar Re: Activity 1.a Hello world
February 12, 2009 12:24PM
@Renate .. Problem solved ??smile
avatar Re: Activity 1.a Hello world
February 12, 2009 12:28PM
Jap. Just kinda sucks that the programmers couldn't fix such a stupid glitch

Thankies sooo much
Re: Activity 1.a Hello world
February 12, 2009 12:35PM
try this

Language: C++
#include <iostream> using namespace std;   int main() { cout << "Hello world!" << endl;   system("pause");   return 0; }
avatar Re: Activity 1.a Hello world
February 12, 2009 12:36PM
Ja ... i agree ....just remember that what you're going through is what i had to go through concerning this module !!
But as long as you're enjoying yourself all this just dissapears ... especially when one of your assignments requests you to display a diamond using only 1 charachter that the user
inputs.. i remember sitting up till 03h00 am to get this one !! smileys with beer
avatar Re: Activity 1.a Hello world
February 12, 2009 12:39PM
Randal , perhaps one shouldn't show 'em "system( pause) " ...(at least not now ! ) but have them try
to understand why the program is not executing or behaving the way one expects it to
Just my opinion ... at least Renate solved her problem with the spaces in the pathname.thumbs up smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 01:32PM
Haha, wiseguy...

Could you possibly be our lecturer?
avatar Re: Activity 1.a Hello world
February 12, 2009 01:37PM
Nope !! I've started my Bsc ISE stream in 2004 ... still busy .... sighhhhhhhh eye popping smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 02:03PM
I checked on the UNISA site, can't seem to figure out which one is your degree?
avatar Re: Activity 1.a Hello world
February 12, 2009 02:09PM
Software Engeneering perhaps?
avatar Re: Activity 1.a Hello world
February 12, 2009 02:12PM
Yip !! smiling bouncing smiley

Software Engineering stream (02089 – ISE)
NB
The last year of new registrations for this stream is 2009. All students have to
complete the qualification by 2013.
avatar Re: Activity 1.a Hello world
February 12, 2009 02:36PM
Does the 2013 story count for you as well, having started in 2004?
avatar Re: Activity 1.a Hello world
February 12, 2009 02:39PM
Yip !!angry smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 02:48PM
And uhm... how far are you?
avatar Re: Activity 1.a Hello world
February 12, 2009 03:34PM
Working and still having to study ...mmmm... Well i didn't register for too much modules each year(haven't disciplined myself enough ! thumbs down) so here's my score .... 14/30
I've registered for 7 this yr ( now only i'm pulling up my socks !! eye popping smiley ) and if i pass 'em all i've got 9 left .... and you ??
avatar Re: Activity 1.a Hello world
February 12, 2009 03:38PM
Eina.....

I only started this year. I study full time. I registered for 12 modules.
I really hope I wasn't being stupid, but I'm rather disciplined.
avatar Re: Activity 1.a Hello world
February 12, 2009 03:47PM
If you're consistent each yr and pass all of 'em you'll probably graduate before i do ...grinning smiley
Considering the fact that as from ....
2010 all 2nd yr modules will have become semester modules
2011 all 3rd yr modules will have become semester modules !!

What degree are you registered for ?
avatar Re: Activity 1.a Hello world
February 12, 2009 03:50PM
Yeah that's rough... But I think I can handle it. Maybe if you can get yourself into shape we'll finish together.
avatar Re: Activity 1.a Hello world
February 12, 2009 03:51PM
Send me PM with the 12 modules you've registered for .. i'm just curious !! grinning smiley
avatar Re: Activity 1.a Hello world
February 12, 2009 03:55PM
Now I have a problem with activity 4.c....

Suddenly it says that there is no such file or directory as iostream and that apparently I have a syntax error before namespace.

How can I let you see my code like you did above?
avatar Re: Activity 1.a Hello world
February 12, 2009 04:01PM
3rd icon below the posting .... click on it and paste your code ... perhaps you should first click on "Preview" prior to posting
avatar Re: Activity 1.a Hello world
February 12, 2009 04:08PM
Wiseguy Wrote:
-------------------------------------------------------
> 3rd icon below the posting .... click on it and
> paste your code ... perhaps you should first click
> on "Preview" prior to posting


Oops !! i meant "above" !! Sorry !grinning smiley
Sorry, only registered users may post in this forum.

Click here to login