Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 135,951 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,694 people online right now. Registration is fast and FREE... Join Now!




Syntax wierdness.

 
Reply to this topicStart new topic

Syntax wierdness., What the heck is up with my program??

TentativeChaos
16 May, 2008 - 07:16 PM
Post #1

New D.I.C Head
*

Joined: 10 May, 2008
Posts: 24


My Contributions
Ok this is really weird: When I try to make programs, I'm noticing that the programs I'm using aren't recognizing my syntax and have a different syntax that what I learned was standard. I've tried this is both Microsoft Visual C++ and Dev C++ with the same result. First of all, things only work if I have
CODE
#include <iostream.h>
although I learned that it's supposed to be
CODE
#include <iostream>
. There are other things that are wierd like this. Another odd thing is that it doesn't appear to recognize the
CODE
newl
command. I've been having tons of trouble with stuff and whenever people help me it still has errors, now I realize that's because of the program not me or you guys messing up. So does anybody have any idea wtf is up?
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Syntax Wierdness.
16 May, 2008 - 07:24 PM
Post #2

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,514



Thanked: 96 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
That's because it's not newl but endl
Another way to create a new line is with '\n'
It's used like so:
cpp
cout << "Hello world!\n\n" << endl;

So, the above code will create 3 new line characters.

Hope this helps smile.gif
User is offlineProfile CardPM
+Quote Post

TentativeChaos
RE: Syntax Wierdness.
16 May, 2008 - 07:35 PM
Post #3

New D.I.C Head
*

Joined: 10 May, 2008
Posts: 24


My Contributions
QUOTE(gabehabe @ 16 May, 2008 - 08:24 PM) *

That's because it's not newl but endl
Another way to create a new line is with '\n'
It's used like so:
cpp
cout << "Hello world!\n\n" << endl;

So, the above code will create 3 new line characters.

Hope this helps smile.gif


well ok, but there are still other weird things.
User is offlineProfile CardPM
+Quote Post

KYA
RE: Syntax Wierdness.
16 May, 2008 - 07:36 PM
Post #4

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 4,736



Thanked: 89 times
Dream Kudos: 1200
My Contributions
Need examples so we can help.
User is online!Profile CardPM
+Quote Post

born2c0de
RE: Syntax Wierdness.
18 May, 2008 - 10:50 PM
Post #5

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 3,906



Thanked: 34 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
QUOTE
I'm noticing that the programs I'm using aren't recognizing my syntax and have a different syntax that what I learned was standard. I've tried this is both Microsoft Visual C++ and Dev C++


Visual C++ 6.0 supports the #include <iostream> directive, and it works on my computer.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 09:05AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month