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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:18:14+00:00 2026-06-16T08:18:14+00:00

In my project there is one .cpp file which include main() function and one

  • 0

In my project there is one .cpp file which include main() function and one more function which I want to call from Form1.h on button click event.

My code:

My someting.cpp

main()
{

Application::Run(gcnew Form1());
return 0;
}

my_function()
{
 /code
}

My Form1.h

namespace somthing {
    //auto generated code

   private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e)
   {  
       my_function();   
   }
}
  • 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-16T08:18:15+00:00Added an answer on June 16, 2026 at 8:18 am

    That’s because the .h file doesn’t know the content of the .cpp file.

    Try declaring the body of your onClick in the .cpp file.

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

Sidebar

Related Questions

In my project one ui file is there , when i am viewing that
This project consists of a single .cpp file which calls LoadLibrary() to load a
My project has two cpp files and one header file. One cpp file contains
I'm working on problem 9 in Project Euler: There exists exactly one Pythagorean triplet
I am working on one project where there is a functionality need to implement
In my project, there is one Base class and there are 3 different derived
I'm currently estimating a new project. My high level estimate assuming there was one
I'm working with the very-useful ID3 framework in my cocoa project. There's one tiny
I have a mvc project and on one page there is a table of
In virtually every project I've ever worked on, there will be one or two

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.