How to have Multiple Main Files in Code Blocks

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024
  • This video shows you how to have multiple, independent programs that can run and test separately in the same Workspace using the Code Blocks IDE.

Комментарии • 64

  • @johnchristianmakalintal568
    @johnchristianmakalintal568 3 года назад +11

    A simple video that includes an effective answer! Thank you so much bro :)

    • @bp3016
      @bp3016  3 года назад +2

      Glad it helped :)

  • @meido3113
    @meido3113 3 года назад +14

    Been really confused and finally found someone who knows my concern😔 thank you so much sir

  • @foreveralone7107
    @foreveralone7107 Год назад +1

    I saw this video from Uzbekistan. It was useful for me . Thank you so much bro.

  • @AjayKushwaha-vi5vg
    @AjayKushwaha-vi5vg 3 года назад +5

    Finally, I found this video, thanks a lot

  • @sirencall1736
    @sirencall1736 4 года назад +4

    i work on visual studio 2019 and this helped me a lot!! thank you !!!

  • @amritraut9404
    @amritraut9404 Год назад

    Thanks man!! I searched about it everywhere in google but finally found your video..

  • @sahiljasoliya3650
    @sahiljasoliya3650 4 года назад +3

    Finally i found what i was searching for .
    🙌🙌

  • @anyetewendaniel6759
    @anyetewendaniel6759 2 года назад

    I really like this video. You did very well. I have been searching for a video likes this for weeks before I chanced on this one

    • @bp3016
      @bp3016  2 года назад

      Sorry you had to search that long but I'm glad I was able to help! :)
      Are you a computer science student? If so, what IDE do you use the most? I wanted to make similar videos for different IDE's.

  • @mertgayretli3970
    @mertgayretli3970 2 года назад +4

    i was about to ask how do we keep the changes but i had discovered it keeps automatically by mistakenly closing lol. many thanks for the video. you literally saved my days

    • @bp3016
      @bp3016  2 года назад +2

      Glad it helped :)

  • @doobieman3241
    @doobieman3241 2 месяца назад

    dude is a legit individual. thank you

  • @biancams4634
    @biancams4634 3 года назад +3

    I really need it ! Thank you so much !

  • @SSTamil
    @SSTamil 4 года назад +3

    Thank you so much
    I lost my 4 hours for finding this...video

  • @paulprins4100
    @paulprins4100 7 месяцев назад

    Many thanks for your extremely helpful tutorial , it is one of the best I have seen. God Bless you.

  • @marksardar1890
    @marksardar1890 3 года назад +2

    Great Video, exactly what I was looking for. Thank you for taking your time and sharing the info !

    • @bp3016
      @bp3016  3 года назад +2

      Glad it helped!

  • @ruthukumar9451
    @ruthukumar9451 3 года назад +1

    Thank you so much, i got my problem solved from your vedio at 02:19 about saving different projects or file ,am happy ..thanks once again BP

    • @bp3016
      @bp3016  3 года назад +1

      Glad I could help :)

    • @ruthukumar9451
      @ruthukumar9451 3 года назад

      @@bp3016 working on codeblocks at this moment 😊thank you..

  • @shaikhfaisal7862
    @shaikhfaisal7862 3 года назад +1

    If i want to create a class of complex numbers separately and want to complex.h file in my main. how can i do that. i can't find the solution of it.

  • @zuhayrakhtab7611
    @zuhayrakhtab7611 7 месяцев назад

    Thanks a lot man! It was bothering me so much.

  • @suryatejas3013
    @suryatejas3013 3 года назад +3

    Thanks for the video. It was helpful. On an unrelated note, I found the background music to be quite soothing to the ears, could you tell its name?

    • @bp3016
      @bp3016  3 года назад +4

      It's from a game called Xenosaga. It's the music that plays when using an ingame feature called the U.M.N. ruclips.net/video/OfS1nWtqZwU/видео.html

    • @suryatejas3013
      @suryatejas3013 3 года назад +3

      @@bp3016 Thanks a lot for the reply!

  • @legendarytwister3656
    @legendarytwister3656 3 года назад +1

    Thanks dude! It helped me a lot!

  • @islamraouf1856
    @islamraouf1856 Год назад

    That was really helpful, many thanks for sharing.

  • @MaZaKeRaL
    @MaZaKeRaL Год назад

    Thanks soo much for this. However, the opposite is happening for me. For example if program 1 was last one that I built, program 2 runs and vice versea? Not sure and probably something I can overlook for now as the main issue was running two separate files under the same workspace. You're the best!

  • @PhuocHo-wc3iu
    @PhuocHo-wc3iu 4 месяца назад

    Thank you. It is helpful.

  • @gabrielattili4308
    @gabrielattili4308 Год назад

    Exactly! Thank you very much!

  • @alexiam.04
    @alexiam.04 10 месяцев назад

    What if I don't initially save the 2 programs as a workspace but separately, and then realizing I want to open them as a workspace? Thanks for the video

    • @bp3016
      @bp3016  10 месяцев назад

      You should be able to open the two files separately in a workspace and then save the new workspace. After that, opening that workspace should re-open those 2 files too.

  • @oscarr956
    @oscarr956 2 года назад

    I try so many time and i dont know why it doesnt show the main.cpp, can u help me??

  • @AjayKushwaha-vi5vg
    @AjayKushwaha-vi5vg 3 года назад +1

    If I add multiple files in the same project, will it work? of course, files name are different

    • @bp3016
      @bp3016  3 года назад +1

      Yes, you can have multiple files in the same project. In fact many people will split their project's functions and classes up from the main.cpp program. You basically put your functions and classes in a .h file and then use the #include directive in your main.cpp source code so that you can call those functions in the .h file and work with the classes in that .h file.

  • @hpeterh
    @hpeterh 3 года назад +1

    Had also problems to register. There is somewhere a link to register via mobile. This worked.

    • @bp3016
      @bp3016  3 года назад

      It's crazy this is still broken. lol

  • @MrudulJain
    @MrudulJain 4 года назад +1

    But how should I run multiple C programs in one project? I have saved 7 C files with mains in the same program but it keeps on compiling the latest one only.

    • @bp3016
      @bp3016  3 года назад +2

      You can't do that, the language doesn't allow it. That's why this video was created. You can only have 1 main.cpp. Keep in mind, main is a function. You can't have two functions of the same data type, name and parameters. How is the program to know which one you want to use? Even when overloading functions, there has to be a slight difference in the parameter list with overloaded functions.

    • @MrudulJain
      @MrudulJain 3 года назад

      @@bp3016 There is a way actually. I figured it out later. You can just check the "do not compile" option for every program except the one you want to run. This isn't a great coding practice tho and I was a noob back then

    • @bp3016
      @bp3016  3 года назад

      @@MrudulJain Really? Okay cool! Thank you for sharing that. I can explore that and perhaps make a new video. I'm glad this one has helped so many people.
      How are you doing with C++? Done any major projects?

    • @MrudulJain
      @MrudulJain 3 года назад

      @@bp3016 I switched to Java & JS. My last project was a simple Student Database Management System, nothing to brag about

    • @bp3016
      @bp3016  2 года назад

      I use Python much more now. I got into machine learning.

  • @abdimoha4078
    @abdimoha4078 Год назад

    Thanks, u solved my issue

  • @claushawnpennerman9384
    @claushawnpennerman9384 3 года назад +1

    Thanks dude.

  • @theNEWcityBEATS
    @theNEWcityBEATS 3 года назад +1

    Thank you so much

    • @bp3016
      @bp3016  3 года назад

      Glad it could help :)

  • @user-fl4cv8eu6m
    @user-fl4cv8eu6m 2 года назад

    That's awesome! Thank you very much sir^_^

  • @ganchimegganbaatar5515
    @ganchimegganbaatar5515 11 месяцев назад

    thank you sm !!

  • @bofoi7200
    @bofoi7200 2 года назад

    Thanks dude

  • @sobiasaif4036
    @sobiasaif4036 3 месяца назад

    waoo its amazing and easy for me thanks sir

  • @markobunteski415
    @markobunteski415 2 года назад

    THANK YOU

  • @Ana-zz3ib
    @Ana-zz3ib 2 года назад

    How can I do this in Visual Studio Community?

    • @bp3016
      @bp3016  2 года назад +1

      Sorry, I'm not sure. I hate visual studio and I'll never attempt using it. It's a horribly complicated IDE. If you don't have to use it, literally anything else would be easier for coding in C++.

  • @sushantpawar5635
    @sushantpawar5635 3 года назад

    Thank you

  • @rula.lulita2515
    @rula.lulita2515 2 года назад

    thanks

  • @jeetsharma9892
    @jeetsharma9892 4 года назад +1

    Thank you so very much

  • @fantarefentez
    @fantarefentez 2 года назад

    thanks

    • @bp3016
      @bp3016  2 года назад

      You're welcome. :)

    • @fantarefentez
      @fantarefentez 2 года назад

      @@bp3016 i'll be using it more oftenly now, i hve started learning again c++and i have already started using it, i appreciate it makes it so easier to account for work ur doing or learning.

    • @bp3016
      @bp3016  2 года назад

      @@fantarefentez Glad I could help :)

    • @fantarefentez
      @fantarefentez 2 года назад

      @@bp3016 your're not doing more videos?... ur explanation method was really nice