C# :: VS Express 2013 - Open TXT File With Custom EXE Program
Jul 13, 2014
I'm using Visual Studio Express 2013 to create a Windows program that will upgrade my micro-controller firmware. I have a .exe program to upgrade it. What I normally do is I drag and drop a .txt file on the .exe program and it will be done. I want to write a program that will do the exact same thing. Where when I click on a button, it will run the .exe program with the .txt file.
What I got so far is just run the .exe program when i press the button. I do not know how to write a code to let the .exe start with the .txt file. Here's what I got so far.
Process.Start(@"C:UsersJayDocumentsVisual Studio 2013ProjectsWindowsFormsApplication1BSL_FilesBSL ScripterBSL_Scripter.exe");
That line only manage to open up my .exe file. How do I make it run with the .txt at this location?
I am fairly new to programming and I am writing a small POS system which in the background creates a receipt. I guess the relevant code would be this:
#include <stdio.h> int main() { FILE *receipt; receipt = fopen("receipt.txt", "w"); fprintf(receipt, "Coffee Bar
[Code] ....
Of course the last bit wont be running for you, since the variables are missing. My question now is, that I like to open this file in a text editor. The file should be opened with a command withing the code. Is that possible at all? As you might can tell the receipt should pop up after the program ran and the user should be able to print it afterwards.
I am trying to figure out how to create a program that will draw a triangle using *'s with a base the has a user-inputted number of *'s like so:
* *** *****
It needs to take a user inputted number and draw a pyramid like the above pyramid with the number of *'s in the base matching the user inputted number (i.e., user enters 10, so the triangle has 10 *'s in the base). I figured it would be best to first create a loop to draw out the correct number of *'s before trying to create another loop to draw out the correct number of spaces, to properly align the *'s into a triangle shape.
int width = 0; int height = 0; int i = 0; int leafWidth = 0;
I want to make a custom program for packaging multiple files in one. Not as complicated as ZLIB or others. Consider few files, XML, txt, JPG, OGG, I want them to be added in 1 file. Not visible not readable. Just a datafile. I have some ideas about creating some kind of indexing of the start byte, end byte of each file. But I am still way too far. Can you point me some direction at what should I stress in creating this software. It will be portable since I am planning to use stdlib, stdio only, maybe and string to recreate the filenames from the large chunk datafile.
Development of a custom binary file type? So far all I know is the just the basic structures of the binary file type, I know that structures are involved but the implementation part I have run into walls.
How to create/use a graphical interface. Especially since Microsoft has removed Windows Form Application support from Visual Studio 2012 and 2013.
I know that Windows Form Application is still supported with C#, but C# is definitely not an option as the program I am developing is heavily depended on some of C++'s more advanced features not present in C#.
Is there an alternative to Windows Form Application? I would definitely prefer one, as I doubt that some workarounds would work for long. What are common ways to create a GUI application in C++? There certainly must be some ways. In Java one would use something like JFrame.
Crossplattformcompatibility: The program I am creating is a Microsoft Windows program only. So I don't care if it runs on Linux or Mac. It only has to run from Windows 7 onward. So if there are more than one standard ways to create a GUI, I would prefer the one working best for Windows.
So this may be against the rules, not sure, grey area probably? However I just bought the PC game Oil Rush, and was having a look at how the assets are packed. As with most games the textures, scripts, sounds and audio are all free to access.
However the game data such as maps, models and other, are packed into UNG files, i.e a custom encrypted file format, which probably is also compressed. So I googled for an unpacker/extracter and found one which also comes with the C source. You can download here. [URL] ....
So I am trying to figure out how these authors work out this file format, from the source we have,
I downloaded Visual Studio 2013 on a new laptop. On my old one I could press things like ctrl + F7 to compile and ctrl + F5 to start without debugging however now it isn't responding when I type those commands. Nothing happens at all. How to change this? I googled "keyboard shortcuts not working in Visual Studio 2013" but per the usual Google comes up with garbage search results that do not pertain at all.
I believe I set up everything correctly. I linked the library folder, the includes, and included the libraries needed. It still comes up with an error that it can't find the functions or something like that.
The error:
Do I need to include the DLL some way? I tried adding it to the build directory and the EXE directory, but it did not work. My code is just a small test.
#include <GLFW/glfw3.h> #include <cstdio> #include <cstdlib> int main() { if (glfwInit() == false) {
I get Error this error. Did I miss something or is that some kind of bug?
Code: error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::string' (or there is no acceptable conversion)301
Code: 2IntelliSense: no operator "<<" matches these operands operand types are: std::ostream << const std::string307
And a few more (up to 3000). These defines are used to read certain fields from a DICOM image, that give information about that image (Patient Name, etc…). However I don’t wish to read all these fields. Instead I’m trying to load an .ini configuration which will configure which fields to read. For example:
[PROPERTIES] # Fields to read fields=PatienId,Modality
This would only retrieve the Patient Name and a Modality.
The problem is, the values I retrieve from the .ini file (reading and parsing the file with std::fstream) come as a string. How could I retrieve, for example, the defined value from PatientId, i.e. “(0x0010, 0x0020)”? Something like std::cout << # << "PatientId"; won't work.
I am trying to automatically(periodically) print screen a custom area of the screen, save it as an image file (the image will have the same format always), and then use OCR to get the text in the image as usable string variables. Is this doable? I was looking into tesseract OCR but I find it a bit unclear.
I have a batch of .pdf files (~1000) with names 001.pdf 002.pdf ...etc. Still pretty new to C, but would it be possible to write a program that would open a PDF, prompt a new name from user, and when entered, close the .pdf and open the next one in the list?
I am creating a console based application which needs to be dual tasking, which prompts me to share a single console for the GUI console based and inputs from the user.
I want to know if there is a mechanism through I can open more than one command prompt so that I would use efficiently both of them.
Furthermore, I would need also to know how to control on which to print and on which not to be printed.
Is there such a thing?
I am using Visual Studio 2012 Ultimate on a Windows 8.1 Professional PC.
I currently have a project that requires me to build a leap motion Virtual Piano. I am using Windows Visual Studio 2013 and i plan to use C++ to code it.
I assume my first step is to create a virtual piano using C++.. Then, link it with leap motion interface.
Can i know which audio library suits my project and how can i go about doing it?
I've almost finished a Terminal/Command Prompt Program that can do most of the things a Microsoft or Linux Terminal can do - but I have a problem. I've got it to open programs fine, and I can also open their browser to the download page if they don't have it, but I need my program to know if there isn't the software so a bit like command prompt where it says 'The system cannot find the file test.txt.' and then it'll take them to the website if they like.
I don't know how to put this really, but I finished a program in Qt, and i want to know how to make a .exe file for it, so i dont have to open Qt and build the program every time i use it.
My program closes after the out even though i've used cin.get():
I want the program to stay open at least until you press enter, even after the whole output.
Code: #include <iostream>#include <string> int main() { std::cout << "Please enter your name"; std::string name; std::cin>> name; // build the message that we intend to write
I'm trying to write a program for a pong game using a tutorial online. Every time i try to run my program its telling me "Cannot find or open pdb file" I have tried running Microsoft visual c++ as administrator and checking the box next to the Microsoft symbol server. I only get a black console screen with a blinking cursor.