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 7001989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:52:21+00:00 2026-05-27T20:52:21+00:00

I created simple code in MVS2010 but it doesn’t work. There is just a

  • 0

I created simple code in MVS2010 but it doesn’t work.

There is just a class with header file and main.

Could you tell me what is wrong?

Main:

#include <iostream>
#include "Developer.h"


int main() {

    Developer xx("asd", "sfdasdf", "asdsa");
    std::cout << xx.Dev_ID;
    char c;
    std::cin >> c;
    return 0;
}

Header:

class Developer {
public:
    char * Dev_ID;
    char * Dev_Name;
    char * ApplicationType;
    char * Name_Application;

public:
    Developer(char * name, char * appType, char * appName);
    void create();
    void edit();
    void remove();
};

Class:

#include "Developer.h"

Developer::Developer(char * name, char * appType, char * appName){}
void Developer::create(){}
void Developer::edit(){}
void Developer::remove(){}
  • 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-27T20:52:21+00:00Added an answer on May 27, 2026 at 8:52 pm

    When I run my app it gives an unhandled exceptions and crashes…

    Of course it does. Your constructor doesn’t fill in any of the member variables. So xx.Dev_ID is undefined; it contains random garbage. When you attempt to std::cout random garbage, the program rightly crashes.

    You probably intend to initialize Dev_ID to some value. You need to do that in the constructor. That’s what the constructor is for: initializing member variables.

    As Chethan stated, you need to look through some basic C++ books.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created this simple code, It it just a button that stays on a
I created a simple code here just to play around with C#. It has
I'm baffled by what is happening to my simple code. It just doesn't go
I have a simple code where tables are created and modified, but the tables
I am using this simple code public class Main extends Activity { private ProgressDialog
I have problem to make work a resource file. This is my simple code
The code is rather long yet simple: 100 leaky JavaScript objects are created. 10
I have used following code to create a simple PDF file. It executes fine
I trying to create a pipe using C#. The code is quite simple but
I have pretty simple code <input type=hidden name=passtophp value=variable> The variable is created in

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.