C++ :: COM Exe Not Running On A Particular Machine?
Jul 23, 2012
I have a COM exe which runs fine on all machines that I have used except one. On a particular machine, the COM exe does not start even after trying to execute it manually (do a double click on the file from explorer).
There are no error messages as well. what could be happening ?
View 8 Replies
ADVERTISEMENT
Jul 10, 2014
My need is that i need to design a program for a machine. The machine takes "x"qty of load, refines 30% of it and sends back the 70% to the initial position. after how many times, does the qty of the load refined will be equal to the initial load and how many times does it need tot be refined?
View 1 Replies
View Related
Jan 25, 2013
Have a program which given a C source code file, gives back RAW MACHINE CODE, which means it doesn't have to be a executable on his own.
Like:
Given a example function for C:
int stdcall Function(void)
{
return 0;
}
Gives back the Machine Code for the Example Function.
It doesn't need to be actual C code, it can also be like:
type int
return 0
Or also it can be a straight assembly-to-machine-code compiler.
Is there any Library? Or even a external tool I can look into?
View 4 Replies
View Related
Sep 25, 2013
My group's chocolate vending machine code is clean, but has a problem.
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
using namespace std;
int main() {
// Variables from function "chocoSelect".
[Code] ....
The functions doesn't seem to link in proper. Also, for the "chocoSelect" function, if a user enters a selection number other than 1 to 5, the machine will stall and wait for 10 seconds to try again. How?
View 11 Replies
View Related
Apr 20, 2013
I am making a finite state machine for a lab. I have here a 2 files with the code for the FSM. I know it isn't finished yet, I know what needs to be put in. The only things I would need help on are the errors that I get.
Warrior.h
#ifndef _WARRIOR_
#define _WARRIOR_
#include "State.h"
[Code]....
View 1 Replies
View Related
Mar 28, 2013
Write a program that simulates an adding machine. When a zero is entered it should print the subtotal of all the numbers entered from the last zero that was entered and reset the subtotal. When two consecutive zeroes are entered it should print the total (not the subtotal) of all the numbers entered and terminate the program. Example:
1
2
3
0
subtotal 6
4
5
-2
0
subtotal 7
8
0
subtotal 8
0
total 21
Be careful this program needs a bit more thought than you might think at first. To get full credit you must make sure it also works for the 0 - 0 case. Example:
0
subtotal 0
0
total 0
The problem is, after I enter the integers and type 0, it shows the subtotal which is what I want; however, when I type more integers and type another 0 to see the subtotal again, it shows the total instead. The subtotal should reset whenever a single 0 is typed and the total should only show when two 0's are inputted simultaneously. Also, after the user enters two 0's simultaneously and views their total, I want the program to exit by saying "press any key to exit." Is there a special name for that to happen? Here is my code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main() {
int subtotal = 0, total = 0, number = 0;
bool input_zero = false;
[Code] ....
View 2 Replies
View Related
Apr 23, 2014
This is my code so far and in my else if statements its sayin "Expected Primary Expression Before "Else"
What do i do?
#include <iostream>
using namespace std;
int main () {
//declare variable
double n,a,b,c,d,total;
[Code] ....
View 3 Replies
View Related
Oct 25, 2014
I have part of it done but im not sure how to get my amount balance to get into my other functions from my file...
#include<iostream>
#include<fstream>
using namespace std;
void welcomeUser();
bool readFile();
void menu();
[Code] ....
and the amount saved that I have in the file is 1200
View 14 Replies
View Related
Nov 19, 2014
Is there a way I can extract Machine / Hardware ID and OS Version using VC++?
View 3 Replies
View Related
Dec 11, 2014
I'm supposed to create a circular buffer that reads an input file and outputs data after running though basically an integral equation. Everything my be referenced by pointers. When I build I am being told segmentation fault: 11. From what I have gathered that means there is a problem with my memory allocation correct? I'm including the custom header file and the main.c as well.
header file :
#ifndef FSM_H
#defineFSM_H
#define INPUT_BUFFER_LENGTH 2
#define OUTPUT_BUFFER_LENGTH 2
#define INITIAL_INPUT {0,0}
#define INITIAL_OUTPUT {0,0}
[Code] .....
View 1 Replies
View Related
Dec 28, 2014
I've recently started creating a bingo caller application. I need in changing numbers to different text boxes. When a number is called it will be displayed in a text box and the last four numbers previous to that. However the oldest number needs to delete and for the remening numbers to move when a new number is called.
View 2 Replies
View Related
Dec 26, 2013
I want to store values permanently in a variable. The same variable should be able to be edited and saved by user, and whatever it is I need the value of the variable from the last time I modified it, like a database. database because i need this to set my connection string of the database.
View 1 Replies
View Related
Jul 23, 2014
after you have compiled a program can you run it without an IDE?
View 17 Replies
View Related
Oct 24, 2013
I want to know if you can run bat files from code? If so how else how can you shutdown a computer with code? OS is windows 7.
View 2 Replies
View Related
Feb 18, 2014
i am writing a function that takes a delimited string and splits the strings into it's respective words according to the delimeter.
1) iterate through string and store delimeter position in vector array.
2) iterate through again and use substr to split into words and store again in a vector.
I then have a dictionary file, and am comapring each values in the string with each in the dictionary, problem is that it overruns the loop and obviously gives a subscript out of range error.
Code:
#include <iostream>#include <fstream>
#include <vector>
using namespace std;
//Start with string inputString
//Find delimeters ::pos as ints and stores positions in vector <int> array
//Run though string using 'find' and seperate string by positions of char32s
//Build vector<string> array of individual words in string
//Open dictionary file and loop though testing each words in vector string array against each word in dictionary
[code]....
View 4 Replies
View Related
Aug 7, 2014
My program is supposed to end when both a and b are 1. Where it is wrong.
Code:
#include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int roll()
[Code] ....
View 2 Replies
View Related
Jun 17, 2014
I have a question, how can I check if a program is running using c++? For example
if (notepad.exe is running) {
.... ..... ....
View 3 Replies
View Related
Feb 9, 2015
Giving a dynamic array, we want to pass the array elements from a file. The first number in the file N gives us the array length. They follow N numbers, the actual elements of the array.
Three brothers are going to work in the shop of their father for a time. The shop is doing well and every day generates profit which the three brothers may provide. The brothers agreed that they would divide the total time in three successive parts, not necessarily equal duration, and that each one will be working in the shop during one of these parts and collects the corresponding profit on his behalf. But they want to make a deal fairly, so that one received from three more profit someone else. Specifically, they want to minimize the profit the most favored of the three will receive.
I first created a program that WORKS! with complexity O(n3).
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int sum_array(int* array, int cnt){
int res = 0;
int i;
for ( i = 0; i < cnt ; ++i)
[Code] .....
Let's assume that we have the following input:
10
1 1 8 1 1 3 4 9 5 2
The ouptut should be 15 -> A = 1 + 1 + 8 + 1 + 1 + 3 = 15 , B = 4 + 9 = 13 , C = 5 + 2 = 7.
But the ouptut is 16!
How can I reduce the complexity of my first working! C code?
View 9 Replies
View Related
Dec 18, 2014
I have a service A, and an application B. Service A needs to launch application B only if it's not running currently. This can be easily done in Windows by calling GetExitCodeProcess function. I cannot find an equivalent method for doing so in Linux/Mac.
So my current code says:
system("open /Users/adsmaster/client/client &"); // to launch the application from the service in a new shell
I read that on a Linux-line machine you can use $ cal to get the exit value of the recently run process but I am not sure how can get the exit value of a particular process?
View 1 Replies
View Related
Jul 15, 2012
I am working on a parallel processing server/client app with a multi-threaded server and several data processing clients, each their own process. I am trying to optimize some of the parameters, such as the size of the chunks that are read, processed, and output, and also some of the timeout values and such. I can track the time to finish a given task well enough, but it would be really nice to be able to track the cpu use. When CPU use is near 100% (on all cores) for the entire run, that is a good sign. I have noticed that with some combinations of parameters, CPU drops quite a bit for long stretches, which is not such a good sign. This app process large input files (2.5GB-65GB so far) and needs to be stable for long periods of time.
Other than sitting and staring at the task manager all day, is there a good way to track/log the CPU usage over runs that take many hours? I know that there are some apps like Everest that chart CPU use, but it would be nice to have something that would write to the same log file I am already using for other program output.
View 1 Replies
View Related
Apr 27, 2012
I need to run a program that makes a SLR Parser Table.
Here is the code :
Code to find first and follow:
saved as SLR.h
#include<stdio.h>
#include<ctype.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream.h>
#define epsilon '^'
since I didn't know how to type epsilon symbol temporarily I am using ^
char prod[20][20],T[20],NT[20],c[10][10],foll[10][10],fir[10][10];
int tt,tnt,tp,a;
int follow[20][20],first[20][20];
void first_of(char);
int count(int j);
void rhs(int j);
[code]....
View 3 Replies
View Related
Jan 4, 2014
I am trying to do single axis solar tracker with linear actuator /rtc/ UNO. I have already done with feedback sensor.
Now Here I am trying to without feedback. Linear actuator specification: 24v , 3.2mm/sec as speed , 600mm stoke.
Desired angle calculation:
tracking start from 7am to 18PM, 11hours
Assumed degree: 7AM as -45 deg , 12.30 as 0 degree and 18 pm as 45 degree.
static float slope= 0.00227272727273;
static float intercept=- 102.272727273;
[Code] ....
How can i put time here. Coding for calculating Ton time and solve above equation. below i posted my code . I need it has to be modified little bit. i need to implement ton time actuator here.
I need function takes desired and actual angle , where actuator try to move to its actual desired position.
Code below in arduino version
Code:
double Desire_Degree;
unsigned int TS;
static float slope= 0.00227272727273;
static float intercept=- 102.272727273;
static int length;
double Actual_Degree;
[Code] .....
View 1 Replies
View Related
Sep 4, 2013
I ran into a problem while using while loop.T he declared and initiated local int variable works well with its specified value while running through the 1st run of a while loop. It is set zero while entering the 2nd run and the following unexpectedly. However, the variable still exits. The following is the code with problem.
Code:
#include <stdio.h>
int main(void){
const int x=6;
char c='y';
[Code]....
View 10 Replies
View Related
Apr 20, 2013
Code:
#include<stdio.h>
#include<process.h>
struct que
[Code].....
View 1 Replies
View Related
Dec 19, 2014
I have created an scientific calculator application and I have a VBS script that runs some of the files. I want to create a C program that runs that VBS script. however, a command window flashes before the application opens. So basically I need a short C (or C++) program that runs a VBS script without a command window popping up. I am on Windows 8 and my compiler is GCC/G++ under cygwin. Here is what I have now that DOES NOT work.
Code:
#include <windows.h>
int main()
{
ShellExecute( NULL, NULL, "StartUp.vbs", NULL, NULL, SW_HIDE);
return 0;
}
View 2 Replies
View Related
Dec 21, 2013
This code will read the running process from OS and display it (C++). Specifically, the OS here is Windows XP. The Problem(error) is in (i think) prototype. By the way, it displays following errors.
Error 1 : error LNK2019: unresolved external symbol _EnumProcesses@12 referenced in function _main
Error 2 : error LNK2019: unresolved external symbol _GetModuleBaseNameA@16 referenced in function "void __cdecl DisplayProcessNameAndID(unsigned long)" (?DisplayProcessNameAndID@@YAXK@Z)
Error 3 : error LNK2019: unresolved external symbol _EnumProcessModules@16 referenced in function "void __cdecl DisplayProcessNameAndID(unsigned long)" (?DisplayProcessNameAndID@@YAXK@Z)
Error 4 : fatal error LNK1120: 3 unresolved externals C:Documents and SettingsWindowsMy DocumentsVisual Studio 2008ProjectsaDebuga.exe
#include <afxwin.h>
#include <iostream>
#include <string.h>
#include "psapi.h"
unsigned int i;
using namespace std;
[Code] .....
View 2 Replies
View Related