C++ :: How To Create Final Executable File That Can Upload For Users
Feb 16, 2013
I develop a software using QT 5 open source IDE. Now my question is two-fold:
1. How can I create the final executable file that I can upload for my users? I understand that runtime DLLs shall be required and I have tried Enigma Virtual Box software for bundling runtime files. It does create the file that I can execute from any folder in my PC. However, surprisingly when I transfer that "boxed" file to another PC, it does not run. Both the PCs have Windows 7 installed on them.
2. Secondly, I see possible future issues with Antivirus Softwares. Apparently when I try to run the boxed exe file, it gets rejected by the Antivirus Software on my PC. Is there a way in which I can get my exe file verified/checked/registered by the Antivirus Softwares so that my users don't face any problems in executing the program.
I cannot afford the QT commercial licence, but I am prepared to buy any economical "setup file generating" software (if it exists).
#include <stdio.h> float total, avg, max, min; float judge[4]; int index; int array[4]; int main() { total = 0.0; max = array[0]; min = array[0];
[Code] ....
I dont understand how to make the array when it prints out only print out the final average and the final maximum score with the final minimum score but what its doing at the moment is just giving an average for each individual score taken...
Minimum and maximum scores are displaying 0.0
And it displays these things 4 times in a row i just want it to be displayed once.
// Make sure there are no errors hIConnect = InternetConnect(hInternet,"192.168.1.4", 211, "******", "*****", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
I have a program that is reading six characters from a text file, swapping every other character(ABCD would read BADC), and then adjusting their value based on a user's adjusted value input. If the adjusted value is 5 then letter A becomes F.
The final output line should print the initial six characters followed by the final six characters after the swap and encrypt adjustment.
I can only manage to print the final characters. Am I far off thinking I need to use pointers to point to the original character values?
One more thing: instructor wants us to complete this project as simply as possible meaning without the use of arrays, loops, switch statements, etc.
#include <iostream> #include <string> #include <fstream> using namespace std; int main() { //declarations char c1,
I managed to upload a file to a remote server with below code:
Code: // Get the object used to communicate with the server. FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://kasunl.worlditsme.com/voo.txt"); request.Method = WebRequestMethods.Ftp.UploadFile;
I am writing a program which compresses files into .zip files.
Here's my problem: Whenever I want to compress an executable file, my readFile function does not read the entire file. When I extract the .exe I get a very tiny and incomplete file.
Here's the function I use to read files:
std::string miniz_wrapper::readFile(FILE* f, int MAX_FILEBUFFER) //MAX_FILEBUFFER has a default value of 65536 { char* tmp; std::string tmp_s; int count = 0;
[Code] .....
Prior to reading, every file is opened using fopen with the mode "rb".
I'm trying to upload a file to a FTP server with curl. The problem is that I do not know what to do after I enter the passive mode and open the specified port. I tried to send data with curl_easy_send but it simply hangs.
bool Ftp::Upload(const char *local_fn,const char *remote_fn) { int ret; string ip; unsigned port; SendCmd("TYPE I"); // Enter passive mode and get IP & port if(pasv(ip,port)==false) return false;
[Code]...
How to send file to the server. And I also suspect I should tell the file size to the server.
finding the last line of the code? I have a program with two functions that open and display a joke.txt and punchline.txt file. My joke function (which reads the entire file) works fine. The punchline function, however, does not.
I am having a lot of trouble trying to save and upload a data table from a text file ,the data table which is bound to a datagrid, creates its own columns at the formloading event, and everytime a user clicks a button row is added to the data table. With the loading i put this code which i thought would read a text file and put all the content my datatable however a exception pops up saying Duplicate Name exeption. Heres the loading piece of code :
{ string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\DG1.txt "; if(File.Exists(filePath)) { StreamReader reader = new StreamReader(filePath); string line = reader.ReadLine();
I have an application which is used for calibration for electrical components. Here I want to set a rootpath for this application. I did some research and I found out that I can get the rootpath of the application (that is where the exe is stored) But what I am really looking for is once I start the application the root path should be what I assign. For instance currently the root path is "C:UsersPublicDocumentsABC.ToolsProjects" but I would like the root path to be "E:New ABC" Is this possible? I wrote some code where I call the exe of the application and it opens the file in a folder that I specify :
i have to upload a ms access database file to the server from my client program. The server program should connect to this database and read the data. What's the easiest way to upload the file? Is it FTP? i tried sockets, but it only allows like 9kb of data transfer capacity.
So I wrote a program to turn a binary file's data into an unsigned character array for inclusion in an executable. It works just super.
I'm wondering how I can write a program that will perform this operation on every file in a directory and all it's sub-directories so that I can I can include everything I need all at ounce.
I need to create a project that create a automated backup of a file.
i will get the file from C:/Folder/file.exe and move for a other created folder, but.. in every time that user make this backup, a folder will be created with year, month and date, like: C/Folder2/2014/April/16:42/file.exe.
Make a program that will ask the users to input 4 different numbers. After the user’s input the program will display the formula on the next line. Next line would be the presentation of the formula which the variables were substituted by the inputs from the user, then returns the average of the numbers entered. **All inputs are integers except average which is float with two decimal places.
I have a small program to calculate the value of salary. I want to user to be able to enter more than one user using array and finally calculates the average salary of all users.
Here is the code
Code: #include <iostream>#include <conio.h> using namespace std; int main() { const int months=3; double net_pay; string EmpName;
Write a program that allows a user to enter high scores of a game, keeping tracking of the name of the user and the score. Add the ability to show the highest score for each user, all scores for a particular user, all scores from all users, and the list of users.
This is the program I am trying to write, however I am having difficulty storing the users name and high score, I know I need to store an array for the score but getting confused because of the structure. (By the way I have to use structures as it is a problem from the structures chapter of the ebook I am doing). Below is my code so far. .
Code:
#include <iostream> #include <string> using namespace std; struct highScore { string user; int score; int highestScore; int allScores;
Player is given choice of x number of Races This choice changes the player's base stats. Then player is given a choice of x number of Classes (archer, warrior, etc.) This choice determines how the player's stats will change upon leveling up.
i have seen a lot of programs that have images inside their exe, dont use external ones. I tried to add image in my codeblocks project, but trying to use it failed. It seems that to use a resource i have to add some kind of header file, but how to do this???
I just don't understand how you would have it count how many negatives and positives there are based on the user's input? Here's the problem and the code it provides:
Modify the program so that is displays the average of the positive and negative numbers. (Hint: be careful not to count the number 0 as a negative number.)
Code:
#include <stdio.h> #define MAXNUMS 5 int main() { int i; float number; float postotal = 0.0f; float negtotal = 0.0f;
I have started to move over to using Unicode, wide character null-terminated strings in my Windows programmes. Accordingly I set the Use Unicode Character Set Visual C++ compiler option. It is my understanding that once you do that the many macros which determine whether you transparently call ...A() or ...W() API functions automatically shift over to calling the wide character variants. As this is a compiler directive, all the choices are made and hardcoded in to the resultant executable at compile/link-time BEFORE it is ever run. Therefore using for example the macro OpenFileName() in the source code instead of specifically calling OpenFileNameW() has no impact on run-time performance.
The next logical step, instead of explicitly using wchar_t is to declare null-terminated string character arrays as TCHAR*. Then, so long as I also employ the tcn... variants of CRT string functions and call TEXT() or _T() macros to create string literals the preprocessor will chose, again transparently whether to create an executable using standard multibyte or unicode wide characters - and their associated functions - all determined by the Use Unicode Character Set switch. That way I can cover both eventualities with the same source code.
So, with all that - I THINK!!! - properly under by belt, I am fairly sure that using TCHAR and its friends will not effect run-time performance at all. However, in his otherwise excellent article the author makes it sound as if using Unicode EXPLICITLY through wchar_t, ...W() API functions and tcn... CRT calls is faster than the TCHAR alternative.
At the end of the day my question is - have I got the right end of the stick; TCHAR makes no difference to executable performance?
So I am awful when having to use data or .txt files. I believe my code is right, I just don't know how to upload the files. Here is the description of the assignment and the coding:
Process the input file containing latitude and longitude data of US cities in degree, minutes, and seconds. Output the processed information in decimal degrees.
a) Write a C++ program to read each line of the input file, store each data line in an array of structure, calculate the degrees in decimal for latitude and longitude, store these values in the corresponding structure and write the results to the output file by processing the array.
b) Use vectors or dynamic array to optimize memory usage. Specify the design choice in your main comment for the program.
c) Split the City and State and store it in two separate fields.
d) Search a city and find it in the array of structure and print out ALL the information on the screen.
#include <fstream> #include <iostream> #include <iomanip> #include <vector> #include <string> #include <algorithm> using namespace std; struct City