I have been trying to make a program using ncurses with c++ but I can’t figure out how to use it.I have it installed on my computer and I am new to Replit.com. Any help is appreciated.
#include <yourlibrarynamehere>
Put that at the top of your file with iostream
You don’t need C++ on your computer to run it on Replit, we take care of that.
It still doesn’t work and I can’t run my library. Under the red scribbled line it says ‘ncurses.h’ file not found.
Here is my code if it helps.
#include <ncurses.h>
#include <iostream>
using namespace std;
int main() {
std::cout << "Hello World!\n";
return 0;
}
By using headings at the top of your file.
#include <name> // libraries
#include “name.hpp” // hpp files
using namespace std; // standard library
I believe it’s just curses.h
I have used the ncurses library in Vim before, so I don’t think it was my library name. And I have just used #include <ncurses.h> than programmed in the past.
Try taking away the n.
@fortnite2016 You could first try to upload ncurses to the Repl using the Upload File button next to the word File in the IDE. Then at the top of your C++ file, write #include "the file path"
That should work
Sorry I could not reply the following day, but how do I get the file path?
@fortnite2016 For ncurses the file path could be NAME_OF_FILE
where the name of your file would replace NAME_OF_FILE. If it’s in a folder then just add FOLDER_NAME/
to the begining of the path. If it doesn’t work then maybe include the link to your Repl so I can tell what the path would be with more certainty.
Here is my repel
https://replit.com/@fortnite2016/MindlessEuphoricStrategies
Thank you so much for helping me out.
@fortnite2016 The ncurses file is a Linux Zip file, so you’re not gonna be able to use it.
My recommendation is to fork this.