The Geek Forum

  • May 13, 2024, 08:27:29 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Due to the prolific nature of these forums, poster aggression is advised.

*

Recent Forum Posts

Shout Box

Members
  • Total Members: 4953
  • Latest: Leonriv
Stats
  • Total Posts: 129628
  • Total Topics: 7187
  • Online Today: 145
  • Online Ever: 1013
  • (January 12, 2023, 01:18:11 AM)

Author Topic: BIg favour  (Read 3624 times)

Netrack

  • Jail Bait
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 84
    • View Profile
BIg favour
« on: September 04, 2002, 05:30:52 PM »

ok im learning c++, i just started, im learning it through school , but im taking it as an independent study class, i have a book, and am trying to follow it, i can ask my teacher but if some one on here is willing to help me, or u could show me a c++ board, it would be greatly apreciated.  


wit this said

      // first project

                           #include <iostream.h>

                           main ( )
                           {
                                cout << "test .n\";
                                return 0:
                           }

why wont this run? or am i doing sumthing wrong, im using a prog called Dev-C ++, i compile it then nuthing happens, what do i need to do



yes i know this is a newbie ? but its my first lang to learn
Logged

hob goblin

  • Professional Blogger
  • ***
  • Coolio Points: +2/-2
  • Offline Offline
  • Posts: 651
    • View Profile
    • http://www.ice-on-fire.net
BIg favour
« Reply #1 on: September 04, 2002, 06:00:37 PM »

Code: [Select]
#include <iostream.h>

void main ()
{
cout << "test" << endl;
return 0;
}


try that
Logged

Netrack

  • Jail Bait
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 84
    • View Profile
BIg favour
« Reply #2 on: September 04, 2002, 08:25:35 PM »

im getting this error


The NTVDM CPU has encountered and illegal instruction


CS: Ip:01c6 OP:02 c8 bc 008d choose 'close' to terminate the app
Logged

hob goblin

  • Professional Blogger
  • ***
  • Coolio Points: +2/-2
  • Offline Offline
  • Posts: 651
    • View Profile
    • http://www.ice-on-fire.net
BIg favour
« Reply #3 on: September 04, 2002, 08:51:12 PM »

bah... brain fart

if im setting main() as null by using void, i can't return a value... so try:

Code: [Select]
#include <iostream.h>

void main ()
{
cout << "Hello World!" << endl;
}
Logged

Netrack

  • Jail Bait
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 84
    • View Profile
BIg favour
« Reply #4 on: September 05, 2002, 05:12:37 PM »

got a clu what this is?

Compiling...
Ex2_01.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\Ex2_01\Ex2_01.cpp(17) : error C2059: syntax error : ','
Error executing cl.exe.

Ex2_01.exe - 1 error(s), 0 warning(s)
Logged

hob goblin

  • Professional Blogger
  • ***
  • Coolio Points: +2/-2
  • Offline Offline
  • Posts: 651
    • View Profile
    • http://www.ice-on-fire.net
BIg favour
« Reply #5 on: September 05, 2002, 05:24:50 PM »

did you edit it? if so post the code you tried to compile, i copied mine and compiled it with no problem.
Logged

Revka

  • Jail Bait
  • *
  • Coolio Points: +28/-1
  • Offline Offline
  • Gender: Male
  • Posts: 186
    • View Profile
BIg favour
« Reply #6 on: September 05, 2002, 05:55:12 PM »

Quote from: Netrack
got a clu what this is?

Compiling...
Ex2_01.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\Ex2_01\Ex2_01.cpp(17) : error C2059: syntax error : ','
Error executing cl.exe.

Ex2_01.exe - 1 error(s), 0 warning(s)

Did you put a comma in place of a semi-colon, cuz that would do it.  It would be really easy to miss, too.

I hate languages that make you put something at the end of a line, like C++, COBOL, PERL, and I'm sure there are others out there that make you do some things like that, too.  Oh well... I'll just stick to my VFP.
Logged
"I think very few of us are not 'messed up' by the internet that are members here. Really, very few are actually "normal" humans." - Chris

hob goblin

  • Professional Blogger
  • ***
  • Coolio Points: +2/-2
  • Offline Offline
  • Posts: 651
    • View Profile
    • http://www.ice-on-fire.net
BIg favour
« Reply #7 on: September 05, 2002, 06:14:04 PM »

i don't see why that is a bad thing, i actually like it, because languages like java fuck up if you put something on different lines
Logged

Netrack

  • Jail Bait
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 84
    • View Profile
BIg favour
« Reply #8 on: September 05, 2002, 08:22:17 PM »

Quote from: hob goblin
did you edit it? if so post the code you tried to compile, i copied mine and compiled it with no problem.


oo woops, im on a diffrent prog now, and Revka you were correct, i put a comma where it should have been a ;. thanks for the help though, im leaning it slowly
Logged

Revka

  • Jail Bait
  • *
  • Coolio Points: +28/-1
  • Offline Offline
  • Gender: Male
  • Posts: 186
    • View Profile
BIg favour
« Reply #9 on: September 06, 2002, 01:46:00 AM »

Quote from: hob goblin
i don't see why that is a bad thing, i actually like it, because languages like java fuck up if you put something on different lines

Um... yeah.

Why not make a language simple so as not to have it fuck up if you forget some stupid detail like a semi-colon or a period at the end of a line.  Why not make it request something to continue a line and leave it at that, like in VFP.  I don't have to let it know if I am finishing a line or not, because it just knows.  I do have to let it know if I'm using more than one line for one string of commands.  That seems pretty basic to me.
Logged
"I think very few of us are not 'messed up' by the internet that are members here. Really, very few are actually "normal" humans." - Chris