C# :: Block Program From Seeing Process Tree

Dec 7, 2011

I have a program that I can only run one instance of. When I try to start it a second time, it doesn't do anything. I would like to create a script that loads the program in a way that I can run multiple instances. Since I assume the program checks the process tree on startup to see if an other instance is already running, I figure disabling access to the process tree could do the trick.

View 6 Replies


ADVERTISEMENT

C Sharp :: Displaying Text File Block By Block In C#

Dec 21, 2012

I have a text file that is divided into blocks:

#1
1:animal
2:food
3:moves
4:oxygen

#2
1:eats:2
2:breaths:2
3:can:1
4:is a:1

#3
1:1:2
1:3:3
1:2:4

And the following program that displays block by block:

StreamReader streamReader = new StreamReader("G:LAB123LABWORK2.txt");
            int block = 0;
            while (!streamReader.EndOfStream)  {
                string line = streamReader.ReadLine().Trim();
                if (line.CompareTo("") == 0)

[Code] .....

My problem is am supposed to add a verification code so that if i put a string e.g 1:?:? it returns the block where the string is found and gives of all possible answers.

Attached Files : LABWORK2.txt (240 Bytes)

View 2 Replies View Related

C :: RPC Program - Serialization And Deserialization Process

May 15, 2014

I want to write RPC program in C for matrix multiplication - My question is that during serialization & deserialization process ,what shall I keep in mind? I recently got an error "call failed: RPC: Can't decode result " ,what this means?

My program is simply send an array A and return 3*A.

View 2 Replies View Related

C++ :: Change Process Name When Program Started?

Jan 27, 2014

1. I want to do 2 while at the same moment. Exactly I want one while which is checking the time and it should di something every X second and the other should check something parallel.

2. How i can write the program what i write automaticly into the autorun on every windows pc.

3. Can i change the process-name when the programm started?

4. Can i save my .exe under another name in the autorun

View 3 Replies View Related

C :: Program To Execute Foreground Process - Signal Handling

Feb 3, 2014

I am trying to create a program that would execute a foreground process. I have this code for the foreground process

Code:
#include <stdio.h>
#include <signal.h>
int main() {
int temp;
printf("We are in the current program

[Code] ....

And this is my main program

Code:
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
int main() {
signal(SIGINT, SIG_IGN);

[Code] ....

My main program stops executing after the process "./scanf" executes and there fore does not print the line "How are You"...

I want to main program to continue executing after "./scanf" finishes. How to achieve that?

View 2 Replies View Related

C :: Program For Infinitely Looping After And Testing For Active Process

Mar 23, 2013

What I have: A basic program for infinitely looping after and testing for an active process. It has a delay system built in to make it so it is not constantly iterating.

What I need: A way to get process IDs from other Processes other than my program. With a way to use that ID to detect if that process is active on the computer or not.

Parts of my code that need changing:

/* Code for handling the process would go here */

/* Code for detecting the target would go here */

What the goal of my program is: Perform operations to terminate the process of cmd.exe when it is active on the user's computer. Then output the status of the process and the time it took to find that process to the user.

It contained functions that I needed, but I need more information on how to apply them to other processes instead of the parent of my program and its' children.

Here is the code I prewrote for this so far:

Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define ZERO 0
#define INFINITE 1000000000000000

[Code] .....

View 1 Replies View Related

C :: Program That Implements Audio Effect / Process Without Using External Libraries

Aug 1, 2013

The brief is to write a program that implements a musically-interesting or musically-useful audio effect/process in C without external libraries other than those prescribed (PortMedia/PortMIDI/PortSMF/PortAudio, Libsndfile).

View 6 Replies View Related

C++ :: Constructors / Classes For Expression Tree Program

May 7, 2012

Previously I made a infix postfix calculator with integers only using structures, which had only three files

1.main.cpp,
2.arithmetic_expression.cpp
3.arithmetic expression.h,

I manged eventually to bring it together. now there are 5 files which are using classes, constructors and destructors and there can be letters in the expression that can have assigned values. Newnode, struct node and all that fine and dandy stuff made sense, this doesn't. What needs to be done in those empty functions in arethmetic_expression.cpp? It was going well until I reached createxpressiontree{ in th arithemetic_expression.cpp and those constructors in there. At that point I missed my structures and was totally confused by the constructors. I know constructors are supposed to create objects, but then I dont know what i am creating the object for and what that object is supposed to do.

1.main.cpp
2.arithmetic_expression.cpp
3.tree.cpp
4.arithmetic_expression.h
5.tree.h

Main.cpp

Code:

#include <iostream>
#include <string>
#include <vector>
#include "arithmetic_expression.h"
#include <map>
int main() {
// arithmetic_expression expression1;
// Testing the RPN input

[Code] .....

View 1 Replies View Related

C++ :: Plant Tree Program Memory Leak

Mar 2, 2012

Write a C++ program that had a base class PLANT with a sub class of that of TREE. The Program works exactly to her specifications except there is a memory leak.

--Header Files --
Plant.h
Tree.h
--Resource Files--
plant.txt - For Input
tree.txt - For Input
plantReport.txt - Output of Program. No cout is really allowed by her.
--Source Files--
Plant.cpp - Code for plant.h class
Tree.cpp - Code for tree.h class
MainDriver.cpp - Contains int main()

View 14 Replies View Related

C/C++ :: Find Maximum Element From A Tree (not A Binary Tree)

Oct 31, 2014

I want to find maximum element from a tree (not a binary tree ) ???? ...using c language...

View 1 Replies View Related

C/C++ :: Binary Search Tree Program - Segmentation Fault Error

Mar 21, 2014

I'm writing a binary search tree program and I got it to compile but as soon as I input something it returns a "segmentation fault error" . I suspect the issue with the code is withing my `add` function.

template<typename T>
void BinarySearchTree<T>::add(T value) {
if (m_root == nullptr) {
Node<T>* node = new Node<T>;
node->setValue(value);
m_root = node;

[Code] ....

View 6 Replies View Related

C++ :: Creating Binary Tree Program - Allow User To Input Data Types

Apr 23, 2013

In class we were asked to create a C++ BTree program that would allow a user to input the following data types and then store said data in a .txt file:

0. ID 8 bytes

1. First name 30 char

2. Last Name 30 char

3. Street Address one 30 char

4. Street Adress two 30 char

5. City 30 char

6. State 20 char

7. Zip 10 char

8. Country 30 char

(I'm not particularly asking for full code, pseudo code would also be great). I had a great deal of my work done, unfortunately, the computer I was working on crashed, corrupting my files.

View 4 Replies View Related

C++ :: Block Internet Access To A PC?

Jun 18, 2012

I need to turn off internet access for SPECIFIC website locations. I use C++ Builder 2010 or Delphi 2010.

View 5 Replies View Related

C++ :: Multiple Comparisons In One Block

Aug 9, 2012

Here's my program bake.cpp(name does not reflect content) I've been researching this binary error and haven't been able to find a solution...

Code:
#include "stdafx.h"
#include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int main() {
//Display a list of options.
cout << "Choose your favorite:" << endl;
[Code] ....

Error code..

1>------ Build started: Project: bake, Configuration: Debug Win32 ------
1> bake.cpp
1>c:usersjonbecherdocumentsvisual studio 2012projectsbakebakebake.cpp(41): error C2784: 'std::basic_istream<_Elem,_Traits> &std::operator >>(std::basic_istream<_Elem,_Traits> &,std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'std::basic_istream<_Elem,_Traits> &' from 'std::basic_ostream<_Elem,_Traits>'

[Code] .....

View 1 Replies View Related

C :: Clrscr Function In Code Block

May 1, 2014

I start working on CodeBlocks and stuck in a situation. The situation is that I want to clear my output screen every time the main function calls some other functions. To do that I use clrscr() function but its not working. After spending some times on web, I found that its a non-standard function so this extension is not used by the new compiler's. Another thing I find to use < cstdlib > library. But unfortunately it do works only for C. It works for C++.

View 2 Replies View Related

C++ :: Passing Block Of Char To Variable

Sep 8, 2014

#include<iostream>
using namespace std;
int main(){
int size_col = 12;
int size_row = 12;
char months_array[12][12] =

[Code] ....

I am having problems with passing a block of a char to a variable, so i could print it out.

It gives me an error: value of type *char cannot be assigned to a entity type char.

View 7 Replies View Related

C/C++ :: Looping Entire Block Of Code

Feb 3, 2014

I just want my program to run continuously until someone enters 0 to exit it. I tried doing while(x=1) and looping my entire block of code. Also there is a switch one is a for one is a while loop both doing the same function. I have basic error checking and whatnot.

/*This is a program that gets a user to input a starting and ending value.
The code then prints the number ie 1 and 5 would be (1,2,3,4,5) and all the squares and cubes.
There is a case statement asking weather you want to run it as a for or as a while loop.
The choices are case sensitive.
*/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>//allows for power and cube function
int x;
int main(){

[Code] ....

View 4 Replies View Related

C++ :: Implementing Signature Block Class

Sep 29, 2013

For class we are required to implement a signature block on all our assignments. To do this I've created a Signature Block class, but I'm having trouble implementing it. When I try to compile in Dev C++ I get this error:

[Error] request for member 'toString' in 'myblock', which is of non-class type 'SignatureBlock()'

Here is the code:

Assignment1.cpp

#include <iostream>
#include <string>
#include "SignatureBlock.h"
// Assignment 1: Requests user's name and says "Hello."
using namespace std;
int main(int argc, char** argv) {
string name;// string to store user's name
SignatureBlock myblock();// create a signature block object

[Code] ....

View 4 Replies View Related

C/C++ :: Illogical Results By Using Try And Catch Block

Oct 24, 2013

there are illogical results by using try and catch block

#include<iostream>
using namespace std;  
class Circle_computations {  
public:
    double area,circumference,radius,pi;  
public:    
 Circle_computations() {

[Code] ....

View 1 Replies View Related

C/C++ :: How To Find Output From A Block Of Code

Feb 2, 2015

int a = 9, b = 4, c = -1;
c *= --b * a;

View 1 Replies View Related

C++ :: Control Execution Of Code Block By Entry

Apr 25, 2013

I have a program including several code blocks in the following simplified structure:

int main() {
// block A
if(a > 0) {
}

// block B
if(a > 1) {
} }

Block A and B should be executed separately, according to entry from keyboard. For example, if entry "1", block A will be executed and block B will be ignored; if entry "2" the inverse will happen.

I can control the execution of these two blocks through macro but the code will be separated during compilation. But is there a way to control them without using macro?

View 4 Replies View Related

C++ :: How To Skip A Block Of Commands When User Interrupts

Nov 3, 2014

I am working on a program that does something like this,

Void main() {
cout<<"H";timedelay(1);
cout<<"E";timedelay(1);
cout<<"L";timedelay(1);
cout<<"L";timedelay(1);
cout<<"O";timedelay(1); //timedelay(int a) is a function which gives a delay of 'a' seconds.
{
....
}
}

This code is just for fancy and I would like to squish in some statements which would give the user an option to skip it (by entering any keyboard key),and resume with the rest of the program.

View 10 Replies View Related

C/C++ :: Boost Dynamic Bitset Block Size

Mar 12, 2012

I am designing an application in which I need to deal with many different variables in which different sequences of bits are stored. I have very strict memory requirements so I decided to use the boost::dynamic_bitset data type which works very well in my scenario as I need to dynamically allocate/deallocate/resize the variables.

The only problem is that I am not able to change the size of the blocks in which the dynamic_bitsets are stored.

I mean, even if I specify the blocks should be "unsigned char", I always obtain 32 bytes allocation by sizeof function, even if the variable is empty.

View 3 Replies View Related

C++ :: Shortcut For Commenting Out A Large Block Of Code

Feb 11, 2013

Is there a quick shortcut (like CTRL+something) to comment out/ decomment a large block of code in Dev C++ when it is selected?

I find it tedious to go line by line and add the // in front of each line.

View 3 Replies View Related

C++ :: How To Print Any Input Year In Digital Block Form

Apr 29, 2013

How to print a year like DIGITAL CLOCK NUMBER for any input four digit number ...

For example if input 1000 the output should be 1000 but each number should look like this in the block form for example number 0 is, don't mind those stars, i did not know to print it here, that is number zero ...

======
=****=
=****=
=****=
======

View 1 Replies View Related

C++ :: Point / Line And Block - How To Design Data Structure

Mar 27, 2014

Suppose, I have point_c, line_c and block_c three classes:

class point_c {
public:
double x, y;
};

class line_c {
public:
vector<point_c> Pt;

[Code] ....

As you can see, lines are composed of many points, and blocks are composed of lines and points. And I defined some member functions, so that I can add points or lines as required by line and block.

But, here comes the problem, if I use line.insertPoints(), or block.insertPoints(), the points will be stored in line or block. That is not what I want.

I want have a single place to store all points, a single place to store all lines, and a single place to store all blocks.

Then I guess I need some global variables

vector<point_c> Pt;
vector<line_c> Ln;
vector<block_c> Bk;

And I should change the classes into:

class point_c {
public:
double x, y;
};
class line_c {
public:
vector<size_t> PtIndex;

[Code] .....

in this way, the member functions will create the real entities into the global vector and set an index pointing to that entity. But this approach just make me feel it is not OOP anymore. when people using these classes, they got be careful about the global variables.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved