C++ :: How To Make Source Code Into Functional Program
Jun 10, 2013How to make a source code into a functional program that a user can open and use without coming across the source code and building or running it.
View 1 RepliesHow to make a source code into a functional program that a user can open and use without coming across the source code and building or running it.
View 1 RepliesI need to have Ufasoft Miner source code modified so it's rendered undetectable to antivirus software. The source code is located here: [URL]
It's programmed in C++.
We have other unrelated projects after this, that you might apply to.
I am making a game and want to make an updater that grabs the source code from a page on the web. Can this use things that are available to all platforms? It could just be something that grabs the text from the page and executing it (maybe using something like Python's exec() command ?) BTW I'm using mac
View 1 Replies View RelatedI want to start developing Android apps in C++, but I do not know what I could use to compile the source code into an apk. I know that C++ is probably not the best choice for Android development, but I already know it and I do not want to learn Java.
View 4 Replies View RelatedIs there source code for LZW decompression in C++ available? Not C.
I'm looking for an implementation of the LZW decompression algorithm in C++ which can take an input buffer and not a file. if one exists?
I'm trying to write a program that prompts the user to enter a math expression (i.e 2*x + x*x) and a value of x. Then generate the value of y. My real question is: Is there a way to put the content of a string into the source code?
Example:
string math_function;
double x, y;
cout << "Enter the function: ";
getline(cin, math_function);
[Code] .....
For example, if one researched how to deep copy a map container and paraphrased a solution from a website, what is the proper format? Are there standards for citing works in code?
I am currently only citing the link to the source in my personal code and explaining what algorithm the source contains.
I use a programming language called layout which nobody here has probably ever heard of. It was discontinued over 15 years years ago but it was a very visual & easy to use piece of software - no coding required. In fact once you name all the variables on cards (forms) from then on it's just mouse clicking & occassionaly typing a number if required. It used blackboxes in a flowchart arrangement which were pre-done code for doing just about anything. i.e opening windows, handling numbers & text, files etc. I have written many programs with it including database management, quoting software & currently use it in my business to track my jobs & do invoicing & ordering. It's a pity it wasn't updated & still around today.
[URL]
Back to the problem. Being a 16 bit program it was written to run on Windows 3.1 but still works on Windows 7!! as long as it is the 32 bit version. I need to write a program that will run on 64 bit W7 without resorting to using a virtual PC solution. I have tried to find something similar that I might be able to use instead but so far nothing comes close to Layout. I just remembered today that layout can produce not only .exe programs but also various versions of C/C++ including visual c++. So I got this idea that if I could get those files I might be able to stick them into a C compiler program to re-make a "modern" exe file.
I could just do a simple sample program & send the source code to them to see if it works on a 64 bit version of Windows 7. how I can do this myself to produce a working exe file.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
struct stock{
char symbol[5];
int quantity;
float price;
[Code] ....
- In the final output
Value
%.2f
- How is the final pointer reference at line33 leading to the output %.2f ? (i do understand that the %% is used to display a %] ....
I know it sounds strange but I've seen things that have files which contain source code (usually in something in Python or such) and how this is read on run-time?
View 1 Replies View RelatedI am working on VS2008. I have two separate projects which have almost same functionality along with same file names but few are different. So I decided to use the same .cpp and .h files for both the projects. Both are Dialog based applications.
So what I did is I merged the source code changes to one by using #ifdef XXXX in all the common .cpp and header(.h) files.
I also moved the .rc file and .vcproj file to other project (As they were of different name).
The problem is with the resource.h file, as it is the file with the same name in both the project. By using #ifdef XXXX in .cpp files the compilation is working file but here in resource.h the resource is getting corrupted and the diglogs are not getting displayed.
how to merge two resource.h files to one.
I'm trying to find a C library for automating mouse clicks and keystrokes, something like the Python package AutoPy would be ideal.
Might have heard of Auto-it [URL] ...., which automates GUIs in Windows. Something like that would also be good, but my main OS is Linux.
I'm not sure whether it would be possible to create a shared library from the C source code in autopy.
How to compile this source code and make a binary file
I think this need linux and run make command or gcc
This binary is a super user for android
source code attached
Attached File(s) : su.zip (7.59K)
I am stress testing my webservers and I need to code or port a C++ HTTP GET flood onto this C++ bot sourcecode. I believe I will need GetTickCount so I can specify the duration of the flood as well. I already have the C++ HTTP Flood .cpp and .h files but have no clue how to put it together onto this source. This will be easier to do over Teamviewer as I'm already using C++ 6.0 and have been with no issues.
View 14 Replies View RelatedI have been working on the same problem as mp252 from an earlier thread and 4 days later, I appear to have it working. Mine only goes from 0-9999 though as I must move on!
Code:
#include <iostream>
#include <string>
int getThousands(int number);
int getHundreds(int number);
int getTens(int number);
int getUnits(int number);
void printNumber(int number);
[Code]......
I had a scrap of paper like a mad scientist trying to find relationships between numbers and the values that they would return through my functions. This is how I arrived at the conditions of my if statements in 'void printNumber'.
I have seen other code that allows a greater range but I can't quite follow it (yet):
C++ code by fun2code - 67 lines - codepad
im trying to write a source code that find the smallest, largest and average of numbers in array. the code runs fine, but it is not giving the highest number and the the average should include only four number excluding highest and smallest number from the array.
void OlympicJudging() // Olympic Judging {
int numbers [6];
double average, sum = 0;
int temp;
for(int i = 0; i < 6; i++){
cout << "Please type a value for scores: ";
cin >> numbers[i];
[Code]...
Why something doesn't work without setting global variables. I want to know how to deliver values for example my boolean value "ende" (means end) from the function in line 99
Code:
bool pruefeGewinn() or in line 116 Code: bool spielfeldVoll() to the main function for using it there for Code: } while (ende != true); in line 164.
How to return it correctly?
Here is the Code of the game TicTacToe.
Code:
#include <stdio.h> // In- and Output
#include <stdlib.h> // Implementation of many functions
#include <stdbool.h> // Allows in C99 True and False as Boolean
#include <time.h> // Allows using Random by time
/*----------------------- Constants -------------------------*/
#define KANTENLAENGE 3
#define STRING 100
[Code] .....
I have a class which upon construction has a part which should be executed when the constructor has finished "enough" to make the call valid.
Take the following simplified class example (the actual problem is much more elaborate):
Code:
#include <functional>
class base {
public:
base(int i, std::function<void()> func) : mi(i)
[code]....
Explicitely creating a derived class allows me to properly implement the lambda to call a member of the class.
I can't seem to figure out how to do this for an explicit instantiation of the base class.
Can this be done ? Or is this a shortcoming of VS2012 or something the standard doesn't handle ?
I am not a C programmer (or a programmer at all). I am just a hobbyist who writes random code (i.e.: ignorant).C is not my area, and I my experience with it is quite LIMITED!Today, I found out that if I need to get "square root" in C I will be in trouble if I depend solely on the compiler..Is it possible to make the compiler to generate smarter code for this (quite trivial code):
Code:
void intprime_c(unsigned long* fprimes, unsigned long count)
{
unsigned long divc = 3;
unsigned long num = 2;
unsigned long sqr;
unsigned long pfound = 0;
}
[code]...
By "without ugly hacks" I mean using already existing code that came with GCC. Because the others did not need ugly hacks to perform better (it is all about being fair).To compute the "square root" in x86 one just need 3 instructions:
fild
fsqrt
fistp
But the compiler is generating a call to a "fsqrt" function and wasting a lot of time by doing this. If not, then why is it taking so long? Is it something wrong in my code (at least the output was verified to be the correct)?
Time taken to get the first 2500000 primes (x86_64):
Assembly = 72.400s (human written, unoptimized, coder level: newbie (i.e.: ignorant))
pascal = 75.200s (written by the same person)
C (fsqrt) = 83.600s (written by the same person)
C (sqrt) = 85.900s (written by the same person)
If it matters, I compiled the C code with this command: gcc -O2 -fno-omit-frame-pointer -fPIC -c ./prime.
(C++ question) I need to be able make a compiled code (like a .dll?) which other programmers can use on linux, win,, mac, etc.
The compiled code would simply do calculations and spit out an answer in memory.
I need it to have certain functions that they can easily call and understand (without actually seeing the source).
My program needs to compile various source files at runtime.What is the most elegant way to compile cross platform with g++ from within my program? Is there a gcc-library I can use? I know that I could use popen() to open a Unix pipe and call g++ as command line tool. But first it isn't really cross platform and second it doesn't seem elegant to me.
View 10 Replies View RelatedI have written a program that copies a file from the source and pastes it there (same location), but with a different name. The program works fine, except there is a small bug that i can't seem to fix. Here is the code:
/*
This program copies a file from the current directory and pastes it to the same directory, but with a different name. The file name form the source must include the extension as well.
*/
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main() {
char temp, s_file[100], d_file[100],
[Code] ....
This is the flow:
> 1) Enter the name of the file you'd like to copy (Must be from the current directory)
> A: 3.c // This depends if the file exists in the
> current directory
>
> 2) Enter the name of the destination file (The file will be copied to the same directory)
> A: 4 //The extension isn't necessary here
>
> Result: The file was copied successfully!
When I run the prg again, and this time input a file name with no extension, like this:
> Enter the name of the file you'd like to copy (Must be from the current directory)
> 3
> You did not enter a valid text. Press "?" to get help or "x" to exit.
I hit "?" and it takes me to
> 1. The file must be from the current directory)
> 2. The location mustn't be empty
Then it asks me
> Try again? (Y/N)
If i give N, it exits. BUT if I give Y, it goes, like this:
> Enter the name of the file you'd like to copy (Must be from the current directory)
> You did not enter a valid text. Press "?" to get help or "x" to exit.
You see, it doesn't give me the option to give it the file name..
This code compiles in release mode but I get this compile error in debug mode:
Error1error C2664: 'GetPrivateProfileStringA' : cannot convert parameter 4 from 'wchar_t [255]' to 'LPSTR'g:easywebstoreuploaderini.cpp45
Code:
CString CIniFile::getKeyValue(CString strKey, CString strSection) {
wchar_t ac_Result[255];
// Get the info from the .ini file
m_lRetValue = GetPrivateProfileString(strSection, strKey, _T(""), ac_Result, 255, m_strFileName);
CString strResult(ac_Result);
return strResult;
}
I'm working on a project that requires to make modifications to certain functions. So, I'll copy and paste the function to a new source code so I'm just working on the function with the entire program running. When I run the function by itself, it works fine. But when I copy and paste the function back to it's spot, the program doesn't wait for input at the cin.getline & it did wait when I ran just the function by itself. I'm using Dev C++ if that makes a difference.
View 2 Replies View RelatedI've been wondering how some program using codes is animated?
View 3 Replies View RelatedI would like to know how can I make a simple program .exe so that I don't have to open it through code blocks every time.
View 2 Replies View Related