Author Topic: Can someone guide me through one of the steps of this tutorial...?  (Read 1985 times)

Offline caffycaffy4414

  • Multiple posting newcomer
  • *
  • Posts: 10
Hello, I have gone onto a tutorial. (I am a total newbie, I started today).

https://wiki.codeblocks.org/index.php/Creating_a_new_project

When that page above states 'Returning to the main source (main.cpp) include the header file and replace the cout function to match the new setup of the project.

main.cpp'

I do not understand it that bit... please can someone just explain that step for me? I.e. what I do. I have followed every other step and I do not achieve the end result, like the tutorial states.

A little help please for a newb?

Thanks.
CW

Offline caffycaffy4414

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Can someone guide me through one of the steps of this tutorial...?
« Reply #1 on: November 28, 2023, 08:27:25 pm »
PS if this post is in the wrong place, please inform me and tell me where I need to put it, and I will move it, or a mod can move it but please let me know. Thank you.
CW

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1563
Re: Can someone guide me through one of the steps of this tutorial...?
« Reply #2 on: November 29, 2023, 02:29:35 pm »
This board is only for C::B development, you should use "Using Code::Blocks".

Stop the tutorial when arriving to Changing file composition, get familiar with this basic project (modifiy, add code...) and get back to the tutorial when you are more experienced.

Offline plonkarchivist

  • Single posting newcomer
  • *
  • Posts: 1
    • doodle baseball
Re: Can someone guide me through one of the steps of this tutorial...?
« Reply #3 on: December 25, 2023, 03:31:32 am »
Locate the main.cpp file:
Find the file named main.cpp in your project. It's likely a source code file where the main logic of your program resides.

Include the Header File:
Look for an instruction or mention of a specific header file to include. It might look something like #include "filename.h". Add this line at the top of your main.cpp file, typically below any existing #include statements.

For example:

#include "your_header_file.h"
Replace the cout Function:
The instruction might be asking you to modify the cout function or replace it with something else. Look for a line in your main.cpp file that uses cout to output something to the console. Replace or modify this line according to the instructions.

For instance, if the original line is:

cout << "Hello, World!" << endl;
And the instruction suggests a change, you might modify it to something like:

customOutputFunction("Hello, New Setup!");
(Note: The actual changes will depend on the specific instructions given in your tutorial.)

Save the Changes:
After making these modifications, save the main.cpp file.

Build and Run:
Depending on your development environment, you might need to build or compile your project. After that, run it to see the effects of the changes you made.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 44
Re: Can someone guide me through one of the steps of this tutorial...?
« Reply #4 on: December 25, 2023, 04:30:24 am »
BOT, the development environment is CB!!!!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Can someone guide me through one of the steps of this tutorial...?
« Reply #5 on: December 25, 2023, 07:53:57 am »
BOT, the development environment is CB!!!!

Are you an idiot? Or do you just not understand English?
Or, are you just wasting time replying to a bot?
Edit2: Looks like you are replying to Bots; no idea why you are doing that.

Tim S.
« Last Edit: December 25, 2023, 08:00:28 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org