473,657 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++ code help (Newbie project)

Redmoon
3 New Member
Hello, I am quite new to the forms and hope this question will be nothing but a simple easy question and to be helpful and but of insight to all the newcomers out here. I am new to c++ and see its wonders in alot of very nice programs. I have my source code which isn't much (forgive me I just started today). OS WinXP is what I am using. My C++ program is Dev-C++ 4.9.7.0. And the whole program is Windows application. I feel bad for asking but really want to learn C++.

Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.   cout << "Hello world!!!!." << end1;
  7.   system("PAUSE");    
  8.   return 0;
  9. }
My result was supposed to be a DOS box to open up and say, Hello world!!! ...then... Press any key to continue. Finished. But I have followed my c++ book very well and can't see why the result I wanted produced.
Jul 21 '07 #1
1 1113
Hypnotik
87 New Member
Hello, I am quite new to the forms and hope this question will be nothing but a simple easy question and to be helpful and but of insight to all the newcomers out here. I am new to c++ and see its wonders in alot of very nice programs. I have my source code which isn't much (forgive me I just started today). OS WinXP is what I am using. My C++ program is Dev-C++ 4.9.7.0. And the whole program is Windows application. I feel bad for asking but really want to learn C++.

Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.   cout << "Hello world!!!!." << end1;
  7.   system("PAUSE");    
  8.   return 0;
  9. }
My result was supposed to be a DOS box to open up and say, Hello world!!! ...then... Press any key to continue. Finished. But I have followed my c++ book very well and can't see why the result I wanted produced.
Hey Redmoon. You also need to:

Expand|Select|Wrap|Line Numbers
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5.  
The iostream allows the use of cin and cout statements.

Also:

Expand|Select|Wrap|Line Numbers
  1.  
  2. cout << "Hello world!!!!." << end1;
  3.  
  4.  
should be:

Expand|Select|Wrap|Line Numbers
  1.  
  2. cout<<"Hello world!!!!."<<endl;
  3.  
  4.  
endl with a lowercase L, not a 1.

Hope that helps.

J
Jul 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
1349
by: Suzie | last post by:
Hi, I've inherited some code from a developer who has moved onto other things. The code makes up a rather simple application: a text editor. The problem is, I'm still a novice programmer and I'm having trouble accustoming myself to the programmer's coding style. Could someone please take a look at the code and reformat it in the way that the newbie books format code?
2
1584
by: engwar | last post by:
Which starter kit or open source project would you consider well-architected? Or more specifically which has good examples to showing a newbie how to separate presentation/business logic/data layer? The Time Tracker 1.x version does NOT seem to fit the bill as there is data access code in the business logic layer. The data layer contains only the SQLHelper class. The duwamish codebase seems to be put together a little better but it
1
1674
by: netcommander | last post by:
Hi all, Can anyone shed any light on how I generate the XML comment documents from the C# code-behind files in a ASP.NET web project in VS2005? I can't find any properties relating to it if I right-click the project name in Solution Explorer. It's a different story for a C# windows application... you get a different set of properties that allow you to specify the name of the XML file to output. I just can't work out how to do it in a...
3
1362
by: tomas_nordlander | last post by:
Hi, I and a college are working on 2 projects, one in C# and one in Vb.NET, and would like to connect the projects using VB.NET project as the main GUI and let an search algorithm in C# do the heavy work. We are both rather new .net programmers and would appreciate some newbie help in letting VB code give instruction to C#. We appreciate any constructed comments, direction, pitfalls.
8
6726
by: cyberco | last post by:
I'm developing for Windows Mobile 2005 PPC using Visual Studio 2005. I need to invoke methods on a DLL (Iphlpapi.dll) but I can't get this working from C# using p/invoke so I want to write some C code that invokes the DLL. Similar to this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getipforwardtable.asp Now how can I, in Visual Studio 2005, create and use such a C class ? Do I have to create an 'MFC...
2
4399
by: lewisms | last post by:
Hello all, I am quite new to c++/. Net so please don't shoot me down for being a newbie. Any way I am trying to make a simple multithreading program that is just to learn the ideas behind it (before I incorporate them in another program). I just can’t seem to get a non-static call to work in my thread that has access to the Form1 variables and controls I need. I can call a non-static function using another class but then I can seem to get in...
12
1711
by: azalea45 | last post by:
Hi all I am a newbie when it comes to access. My company requires that all Databases run on the company SQL back-end as a result i have a Access project that connects to the server. I have two tables, table 1 called tblProjectDetails, table 2 called tblLearners The fields in tblProjectDetails are ProjectPK numeric (Its also the Primary Key)] Name char (50) Description char (50) There are other field but they dont play a role in the...
5
2145
by: SharkD | last post by:
Hi! I'm a total newbie when it comes to ASP (or any type of server-side programming). I want to start a project that does the following: 1. query Wikipedia for information regarding articles using the
2
1171
by: Peter Webb | last post by:
I want to use the arbitrary precision integer arithmetic package "IntX", from http://codeplex.com/IntX/ This adds a multiprecision class for integers. I cannot see how to add an external class in to my project. If I just compile the IntX code as a project, I get a million errors (missing namespace). I can't find the library in the list in "Add Resource ..." under Project in
8
1605
by: jch | last post by:
Sorry for the newbie question but I'm trying to learn Visual Studio. I've got VS Express 2008 and I'm using visual basic. I'm trying to learn how to deploy a program so I've written a very basic windows application (lets call it TWinApp1) with just a couple of buttons and a text box. It is very simple and runs fine in the debugger. Using TWinApp1 I'm trying to learn how to create a setup program to install an application on a system....
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.