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

  • Home
  • SEARCH
  • 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 7866037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:16:13+00:00 2026-06-03T00:16:13+00:00

I am really new to C++, and I am trying to create a class

  • 0

I am really new to C++, and I am trying to create a class in a separate file, and I ran into a problem. I basically copied the tutorial http://thenewboston.org/watch.php?cat=16&number=15 from the newboston word for word. However, for the things don’t work. I am getting this error when I am trying to run the main file:

C:\Users\Akavall\Desktop\C++ Stuff\New C++ stuff\class_try.o:class_try.cpp|| undefined reference to `Burrito::Burrito()'|
||=== Build finished: 1 errors, 0 warnings ===|

Also, when I am creating the class. The Workspace icon is sitting by itself, while it is supposed to (I believe) include my .cpp and .h folders of the just created class.

My guess is that my paths are not set correctly somewhere, but I have no idea how to fix that. Any suggestions?

Here is the code that I am using:

Main file (class_try.cpp)

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

using namespace std;

int main()
{

    Burrito bo;
    return 0;
}

The class files:
Burrito.h

#ifndef BURRITO_H
#define BURRITO_H

class Burrito
{
    public:
        Burrito();

};

#endif // BURRITO_H

Burrito.cpp

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

using namespace std;

Burrito::Burrito()
{
    cout<<"something silly"<<endl;
}

What should I do to fix the this problem?

Thank You in Advance

Edit:

I am using CodeBlocks, and I am on 32bit windows.

  • 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-06-03T00:16:15+00:00Added an answer on June 3, 2026 at 12:16 am

    If you are using MSVC like that tutorial you linked, you need to first create a project. After creating the project, add all the header (.h) and source (.cpp/.cxx) files that you want to include/compile in it. Now, MSVC makes this easy from this point; you can simply compile (as long as everything is properly added to your project) and it will compile things in order for you.

    Extra Information
    The information below is not directly pertinent to this issue (or at least doesn’t seem that way since you’re on Windows), but is intended to help your growth as a developer if you want it.

    If, however, you ever decide to use a command line compiler (i.e. MingW) or work in a *nix environment, it is important to note that you need to explicitly compile each object (without linking; in gcc/mingw this flag is -c). Then at the end of compiling several unlinked object, you compile all the objects and the main source file together (with linking this time) and it will create one executable.

    I would recommend, however, before trying a command line compiler that you get comfortable/familiar with doing this process through an IDE. Since it is generally an automated process anyway (i.e. most developers end up writing Makefile’s for this kind of thing, realistically) you do not really lose too much (immediately, anyway) by not doing this. It is just something to be aware of as you learn.

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

Sidebar

Related Questions

I'm really new to ASP.NET MVC, and I'm trying to integrate some Javascript into
I'm trying to create a simple class to read a csv file and store
I'm really new to iOS development and I'm trying to create a simple table
I'm really new to generics in Java. I'm trying to create a simple method
I am really new to C++ and I am trying to get the output
I'm really new to Python. I'm trying to import a third party module called
I am trying to add a new menu item to Eclipse's popupmenus. It really
I'm new to Android and I think I'm trying to do something really basic:
Hi I am really new to rails and I am just trying to figure
I'm trying to create am immutable type (class) in C++, I made it so

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.