CLion doesn't have CSV file support? - c++

I'm new to Clion, switching form Visual Studio and I'm trying to impliment a program that reads in data from a .csv file. However, after I put the file in the directory it doesn't seem to recognize the file. Any resources? I can't find anything on jetBrain about this either.
Thanks.

Just like Konafets, I am not quite sure about what your exact problem is, but have you tried installing the CSV Plugin for CLion?
Go to File | Settings | Plugins, type 'csv' in the search bar, click 'Search in repositories' until you land on the install page.

Related

VS Code unable to detect Standard C++ Libraries

I started using VS Code, and after messing around with it I kind of managed to make it detect Windows and Direct3D SDK's with the c_cpp_properties.json, but I'm failing to make the Standard Library work. So, if I do:
#include <string>
#include <vector>
It throws me an error just like this:
//Include file not found in include path
I've searched all over the web and didn't find any clue, so here I am! Strangely enough, if I just create a new .cpp file in an empty window/editor, it works. But the moment I 'load' the folder that file is in, then it fails. So, this is really driving me crazy.
I'm using Windows 10, with .NET 4.6.2, the 2015 Visual C++ Redist, and the Windows 10 SDK, all blazing new installs from today. My ultimate goal is to port a project I made in VS2013 to GNU/Linux, so I'm trying to make things work step by step.
Thanks a lot beforehand!
EDIT: Compiling with g++ works just fine, even though VS Code complains. This is what happens.
VS Code need to locate the include libraries.
First of all locate where g++ is located. You mentioned that it works fine. It's an .exe file (windows). So you may find g++ directory in path settings. view path variables.
Now after getting g++.exe directory you may easily find a file names string in nearby folders or parent folders. After successfully locating it copy its full path.
Now back in VS Code put cursor over green underline and you should see a bulb. Click it and in the options you will see option Edit "includePath" setting or Update "browse.path" setting. Select it and a file will open named c_cpp_properties.json
Now in that file locate "name": "win32". In the include path option paste the directory name of string file like this and you are good to go.
In vscode go to file>preferences>settings then select edit in settings.json (This can be hard to find, certain settings have this option by them, others do not. There is probably a better way to access this file, but I don't know it)
This will open up the settings.json file, where you can add the line:
"C_Cpp.default.includePath": ["C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include"]
(or whatever your include path is) This will add that include path for all projects, or only the current workspace depending on if you open the settings.json file for "User Settings" or for "Workspace Settings"

Eclipse for c setup, cannot locate stdio.h

I have setup eclipse as per this tutorial:
https://www.youtube.com/watch?v=KfKvDIrabUw
I have intalled java and GCC on my windows 10 laptop. It cannot build my c project, because I get the error "fatal error: stdio.h -std=gnu99: No such file or directory".
I assume this file exists on my computer somewhere, if not by default then with thte GCC that I downloaded and installed. I just need to find, in the hundreds of option menus, the place where I locate the directory. Maybe I'm blind but I can't find it, and if I do, where to I link it to? (Getting a little frustrated if you couldn't tell...)
Many many thanks,
Andy.
I solved it. If anyone else is experiencing this problem, open up the project explorer, right click on your project and open up the properties. Make sure Text file encoding and New text file line delimiter are both set to UTF-8.
It is now working.

MarmaladeSDK: How to create a project in XCode?

I've created FirstProgram.mkb with the following content:
files
{
(source)
HelloWorld.cpp
}
subprojects
{
iwgx
}
I started it with XCode 4.6 and it opens it as a text file. What do I do wrong? How to create a marmalade sdk project in XCode?
I don't need MarmaladeQuick cause I need to use C++ (not Lua as for Quick).
If you have more than one Marmalade version installed, you need to be careful of associating .mkb files with the mkb.app. My experience on Macs is that this overrides the s3e_config settings. I'm planning to write a script that picks up the s3e_config setting but for the moment I would advise using the command line shell: cd to the appropriate directory and then do "mkb foobar.mkb" or whatever.
[FTR Contrast with the PC situation where s3eConfig.exe sets up the GUI but not the command line!]
Just double click on the mkb file and if it asks, use mkb.app found in /Developer/Marmalade/6.3/Applications to open the file. The mkb script will automatically create an XCode project for you and will open it in XCode too.
Just remember, never open the XCode project directly. You should always double click on mkb to open XCode, since it updates the XCode project files when needed.

Cannot run a jar file

I am trying to open a jar file I downloaded from here which is supposed to be an application that tests a sensorML code I wrote. I am expecting an application with an interface where I| would put my code and get some kind of output... I am unable to open the jar file. I tried the command window, I get could not find or load main class. I tried opening it with eclipse, I get some kind of library with a lot of errors. There is no documentation about this library or application so I am kind of lost on what to expect and how to get it... Anyone can help me open this file in a correct way?
Thanks
The only jar available near the URL you like isn't an executable jar. It is a library to write programs. To open it you can rename it as .zip and uncompress it.
You can also download the .tar.gz version of this library so you can get the full source with all comments.

Read a file from current directory using ifstream and QtCreator

I'm using Qt Creator for a plain C++ project without the Qt libraries.
I'm trying to open a file like this:
fopen("text.txt", "r");
or
ifstream fin;
fin.open("text.txt");
But it doesn't work with just the filename like in Visual Studio, I have to pass the full path for it to open the file...
Anybody knows why is that? and how can I refer to the current directory without using Qt libs?
You can use QDir::current() to check wether the working directory is what you want it to be. Without Qt you can use the solution TomA linked to.
The run settings allow you to configure it for running the application from the IDE.
It will; your code is fine. But as other answers allude, you need to make sure you're running it in the directory you think you are.
On the left panel select "Projects" then (from the tabs at the top) "Run Settings" and it will show you where it runs the executable from in the field labeled "Working directory". I think by default it's the directory above the release and debug folders.
The difference between Visual Studio and Qt Creator may be that
Each starts the program binary in a different subdirectory of your project structure.
One does copy the text.txt file as part of your project to the same output directory as the binary, the other does not.
Try to get the current directory using this and then see if it actually contains the file.