Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6907323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:25:14+00:00 2026-05-27T08:25:14+00:00

I am using netbeans 6.8: Product Version: NetBeans IDE 6.8 (Build 200912041610) Java: 1.6.0_18;

  • 0

I am using netbeans 6.8:

Product Version: NetBeans IDE 6.8 (Build 200912041610)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Users\Andre\.netbeans\6.8

I have copied a program out of a book I am using to do C++ self study. Here is the code:

/* 
 * File:   main.cpp
 * Author: Andre
 *
 * Created on December 5, 2011, 2:06 PM
 */

#include <iostream>
#include <string>

//using namespace std;

using std::cin;
using std::endl;
using std::cout;
using std::string;

int main() {

    // ask for the persons name
    std::string name;
    cin >> name;

    // build the message that we intend to write
    const string greeting = "Hello, " + name + "!";

    // the number of blanks surrounding the greeting
    const int pad = 1;

    // the number of rows and columns to write
    const int rows = pad * 2 + 3;
    const string::size_type cols = greeting.size() + pad * 2 + 2;

    // write a blank line to separate the output from the input
    cout << endl;

    // write rows "rows of output"
    // invariant: we have written r rows so far
    for (int r = 0; r != rows; ++r) {
        string::size_type c = 0;

        // invariant: we have written c characters so far in the current row
        while (c != cols) {
            // is it time to write the greeting?
            if (r == pad + 1 && c == pad + 1) {
                cout << greeting.size();
            } else {
                // are we on the border?
                if (r == 0 || r == rows - 1 || c == 0 || c == cols - 1) {
                    cout << "*";
                } else {
                    cout << " ";
                    ++c;
                }
            }
        }
    }
    return 0;
}

Here is the build results:

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .clean-conf
make[1]: Entering directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
rm -f -r build/Debug
rm -f dist/Debug/MinGW-Windows/acccpp20.exe
make[1]: Leaving directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
CLEAN SUCCESSFUL (total time: 569ms)

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
/usr/bin/make  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/acccpp20.exe
make[2]: Entering directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++    -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW-Windows
g++     -o dist/Debug/MinGW-Windows/acccpp20 build/Debug/MinGW-Windows/main.o  
make[2]: Leaving directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
make[1]: Leaving directory `/d/Users/Andre/Documents/NetBeansProjects/AccCpp20'
BUILD SUCCESSFUL (total time: 1s)

When I run the program I get a message in the output area of netbeans that says "Process is starting in external window..." and a terminal window that pops up with "C:\msys\1.0\bin\sh.exe with just a blank screen and blinking cursor.

When I did a simple program just printing out "Hi!" it works fine. What is going on with this??

Also, how do I do a code block posting a question?? The tutorial said something about 4 spaces…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:25:14+00:00Added an answer on May 27, 2026 at 8:25 am

    Its waiting for you to type in your name and press enter.. at which point it should continue running. If you want it to ask you to do this you need to do something like:

    int main() {
    
        // ask for the persons name
        cout << "Please enter your name" << endl;
    
        std::string name;
        cin >> name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using NetBeans IDE 6.9.1 for developing java/javafx applets, this netbeans version generates only
I am using netbeans IDE to develop a GUI for a java program. I
hi i am using netbeans 7 IDE for java programming , and i am
I am using Netbeans to build a Maven project, and have the JTidy java
I'm using NetBeans, trying to change the familiar Java coffee cup icon to a
I'm using NetBeans as my IDE. Whenever I have some code that uses another
I've been using NetBeans with xampp in windows Desktop. Now I start to learn
I am following this tutorial, I'm using netbeans 6.5.1 http://www.netbeans.org/kb/docs/java/gui-db-custom.html When I get to
I've been using netbeans for java gui creations, are there any other better frameworks
I'm using Netbeans. Every i compiled java.exe memory usage in task manager always higher

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.