# CNotebook

"CNotebook" is used for `.c` files.

## Usage

### Setup

```javascript
const Nodebook = require('nodejs-notebook');

const index = new Nodebook.CNotebook('index');
```

**note(code)**

Similar to `addLine()` but it does not automatically add an indent.

string `code`:\
The C code to add.

```javascript
main.note('using namespace std;\nint main() {printf("hello world");\nreturn 0;\n}'
// Inserts this long line of code that should output "hello world"
```

**comment(comment)**

Insert a C Comment.

string `comment`:\
The comment message to add.

```javascript
main.comment('This needs editing, Franchis!');
// Inserts "/* Over here Michael! */"
```

**compile()**

Attempts to compile the C file.

```javascript
main.compile();
// Will output if there were any errors in the terminal.
```

**include(module)**

Inserts `#include <>` with the module name at the top.

```javascript
main.include('stdio.h');
// Inserts "#include <stdio.h>"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nodebook.js.org/c-c++/c.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
