I am new to using C++, and I have been trying to plot some basic graphs that include legends in them. I have been googling to find ways to do this, and found that chplot.h can do this, like in the link below:
http://www.softintegration.com/docs/ch/plot/
I want to download this header file online, but can't seem to find it. Is there a website that can do this? Or is there another header file that allows you to plot a legend on a graph?
Thanks very much!
A header file itself will most likely not allow you to do anything. You'd need the whole library (Ch professional in this case) for that. Have you read through the site you link to?
Anyway, they say they're based on GNUplot, so you might want to investigate that.
On the other hand, if you want to learn C++ rather than just use it for one particular task, there are easier and better suited problems to start with.
Related
I created a very customized leaflet map on a Bitrix website (they forced me to, not my choice). Now other coworkers who are basically "afraid" of code need to be able to add markers to that. I already created a C++ program where they can simply enter all the details they want (what category, whats the popupcontent etc.) and it spits out the geoJSON code for the marker for them to copy and paste into the website.
To make it even more easy for them I am wondering if there is a way to basically have my program connect to the internet, go to the backend of my website and, after asking for login, adds the code to the respective .js file that contains only the marker code.
I have been googling the problem but unfortunately couldnt find any other related posts.
Okay I finally found the I guess easiest way, I will force my colleagues to install python and write a little thingy to concatenate the code and upload it using Selenium. Thanks for your help guys!
Basically, I want to be to be able to pass data between Excel cells and
my C++ program. I don't have any experience in Excel/C++ interactions and I haven't been able to find a coherent explanation or documentation on any websites. If someone could link me some references or provide one themselves it would be much appreciated. Thanks.
If this is for a Windows system, you could always use one of the available managed Excel libraries, such as OfficeWriter or Aspose.
There also might be similar libraries specifically for c++, I know we (OfficeWriter) used to make one.
Edit: Looks like there are a few out there, like LibXL and BasicExcel.
If the application will run on an end user machine with Excel installed, you can easily use the Excel interop and keep Excel hidden.
In addition to LibXL and BasicExcel mentioned by smoore, there is:
ExcelFormat Library is an improved version of the BasicExcel library and will allow you to read and write simple values. It is free.
xlslib will also read and write simple values, I have not tried it tho. It is also free.
Number Duck, is a commercial library that I have written, It supports reading and writing values, formulas and pictures. The website has examples of how to use the features.
I am trying to create C++ code that allows User Input in selecting a variety of fields, then it will calculate many different angles and show the users the results, as well as a graph.
However, it has been suggested to us by our lecturer that it may be a good idea to write the code to these calculations etc in C++, then input the results into Excel.
Does anyone have any idea how to do this? Literally looking for a way for the user to fill in the required values on C++ and then to be AUTOMATICALLY taken to the excel file to show the results in the table and graph format.
If this is not possible, is there a way to display the results in the table and graph format through C++?
Thanks very much in advance
Excel provides COM interface which you can use from your C++ application.
This can be done in the way described in this article:
http://support.microsoft.com/kb/216686
This link might also be useful:
http://www.codeproject.com/Articles/10886/How-to-use-Managed-C-to-Automate-Excel
I think the second link would be better for you as its more of a step by step guide which should help you to workout the answer.
Use COM Automation to automate excel.
The best way to do this is to use the vole library by Matthew Wilson at
http://vole.sourceforge.net/
Take a look at the examples. I do not think there is an example for excel, but there is one for microsoft word at http://www.codeproject.com/KB/COM/VOLE_word.aspx
I have used vole in the past, and it makes it a whole lot easier
I want to be able to combine multiple tracks of audio into one file but have no idea what to do. I need to be able to do the following:
I need to have multiple tracks playing simultaneously, and need to be alter the volume of each track at various points,
I need some tracks to start at different time,
And I need to be able to write the result to file.
I'm not sure what library to use for this, if anyone has a suggestion that would be helpful.
Nobody has answered this question, so I'll post what I ended up doing. I tried using libffmpeg first, but it was far too confusing to get to work. So instead I used libsndfile which is available under the LGPL. It's extremely simple, but that means there's nothing messy to fool around with. The only problem is that it can't use the MP3 format, so I'll just programmatically call ffmpeg.exe and convert MP3 files to FLAC and load those. It's not perfect but it will do.
i am writing (using C++ and GTKmm) a simple photo browser that is available on GitHub:
https://github.com/jjkrol/ZPR
Currently i am working on creating a button, which will allow user to open currently displayed photo in external editor (for example GIMP). Because of this, i have two questions:
Are there any examples of using Gtk::AppChooserDialog class? I couldn't find any and it's hard to start working on choosing the editor without them.
Most important question - i am thinking about a way to launch an application with photo in command line. The only solution that comes to my mind is using system() call to do something like this: system("gimp /path/to/current/photo.jpg"); , but it is probably not the best way of doing this. Anybody knows a better way? I would like to port my application to Windows someday and a more portable way would be great.
Thank you very much in advance.
Instead of system, you might want to use Glib::spawn_command_line_async. There are other similar functions that gives more control if you need it.
For examples, you might want to look the source code of an application like glom.
Thank you very much for answers, gpoo and ergosys! In the end i decided to use Gio::Appinfo as it looks more OOP-like. If anyone would face the same problem - this is what i have end up with:
Glib::RefPtr<Gio::AppInfo> editor = Gio::AppInfo::create_from_commandline("gimp",
"GIMP", Gio::APP_INFO_CREATE_SUPPORTS_URIS);
Glib::RefPtr<Gio::File> photo = Gio::File::create_for_path(
(*currentPhoto)->getPath().string());
editor->launch(photo);
Of course choosing the editor with Gtk::AppChooserDialog is not yet implemented.