C++ :: Input Edit Task
Jan 20, 2015
how i am using wxDev-c++ and i need to make.Tasks would include: use a class or struct variable, and create a program that can perform the following actions:
1. The data provided by the user to enter the keyboard.
2. The display of the stored data.
3. edit the data.
Example of data: name surname age.
I Try like it,its let me input and save it but how to edit it or i am doing it bad?
#include<iostream>
#include<fstream>
using namespace std;
int main()
[code]....
View 5 Replies
ADVERTISEMENT
Aug 6, 2013
Here is what I am trying to do. I am reading from a socket. On receipt of specific data from the socket I have to start some computation (takes more than 5s). But if there is another input from the socket when the computation is in progress I need to disregard the ongoing computation and start all afresh. I have not come across any method which could suspend the ongoing task in the same context. I have thought of running computation in a separate thread. But I feel there must be some other methods doing it in the same context which I am unaware of. And, is my understanding correct that process would take up the new task only after completing the previous computation (which I do not want).
View 6 Replies
View Related
Jul 20, 2013
Given N tasks (numbered 1-N) and a series of task restrictions (do task 3 before task 2) print out all possible task orderings.
Example input:
3
3 2
Explanation: there are 3 tasks and task 3 must be done before task 2 (each restriction will have its own line)
Example output:
1 3 2
3 1 2
3 2 1
View 9 Replies
View Related
Feb 27, 2013
I have been asked to create a program to overload a function which should accept and print first one integer and then two integers. Here is the code i have produced so far: [URL] ....
Code:
#include <iostream>
using namespace std;
//Overloading f1 three ways
int f1(int a);
double f1(double a);
long f1(long a);
[Code] .....
I am aware the code should work. my only concern is the error i receive on line 12. I am certain there should be a value in the bracket but i dont know what.
View 11 Replies
View Related
Oct 21, 2014
I am searching for a way/api through which i can get list of Applications as showing by task manager inside Applications tab. Is there any way?
View 3 Replies
View Related
Oct 7, 2014
I want to show all running processes of windows.
my motive is whenever any running process closes/quits whether it be console or window based on windows it notify(s) me or user that some .exe has been closed.
View 1 Replies
View Related
Feb 24, 2014
I am looking a good design pattern that takes a combination of a Observer Design Pattern and Command Design Pattern.
Observer Design Pattern:
Subject - ISystem
ConcreteSubject - "Different Types of Systems"
Observer - INotifier
ConcreteObserver - "Different Types of Notifier's"
Command Design Pattern: Used to create a task. "Different Types of Task" ....
View 4 Replies
View Related
Nov 9, 2013
I am checking out this simple piece of code:
private void button1_Click(object sender, EventArgs e) {
Stopwatch sw = Stopwatch.StartNew();
Task Task1 = Task.Factory.StartNew(() => {
Console.WriteLine("Task1 started in : "+ " "+sw.ElapsedMilliseconds);
Thread.Sleep(4000);
Console.WriteLine("Task1 finished in : " + " " + sw.ElapsedMilliseconds);
}
);
}
and the results are :
Task1 started in : 2 in milliseconds
Task1 finished in : 4015 in milliseconds.
The problem is, that if i count the time with an external device, just like the timer of my watch or my cellphone s,the total time is 4,8 or 4,9 seconds, which i wouldn t expect that to happen.
The first thing i ve thought, is that it takes the ThreadPool about 800msec or 1 sec to create the thread so as to execute this task, but even if it is so, shouldn t the stopwatch count the time precisely?So , why is there a deviation between an external timer and the stopwatch ?
View 1 Replies
View Related
Jun 17, 2014
The following code is an example of how task are created with micro cos III in c. I am trying to figure how to create similliar code in C++. My problem is how do I instantiate objects and how to use member functions to represent task. Within the create task routine the address of function is passed as argument. How do I do this in C++? Will I need more than one class? New to embedded C++.
/*!
* @brief LED Flasher Task
*/
void
led5_task (void * p_arg)
{
OS_ERR err;
(void)p_arg; // NOTE: Silence compiler warning about unused param.
[Code]...
View 2 Replies
View Related
Feb 23, 2015
My use case is this: I have a C# Console application. I would like to run it via the Windows Task Scheduler, and would like it to attempt to run until it succeeds. My problem is that I can't achieve this. How does the Windows Task Scheduler recognize that a program has failed? I tried returning 1 or 32 instead of 0 but that didn't work. One possibility is to have the rerun logic in the C# console application but it feels like there must be a better way.
View 6 Replies
View Related
Dec 19, 2012
Basically the question is to develop an application that allows: Create an application which stores information about people, along with a task list.
The user should be able to Store people's information
Name,
Age,
Telephone number,
Address
-Retrieve information by entering name
- Remove a person's record by entering their name
-Return records for all people, sorted according to an information type other than age
-Enter a task which needs doing, a priority entered for its urgency
-View highest priority task on the list
-User should be able to remove highest priority item on the list
How to develop this application on a console command line interface style or any other style.
View 2 Replies
View Related
Apr 16, 2013
Well,I have a dat file which following format;
ID Level(Manager or Executive)
Name
Sales(for 12months)
For example;
W00051 M
Lee Ah Moi
1200.00 150.00 1400.20 156.00 200.00 880.00 1500.00 8000.00 800.00 120.00 1600.00 1800.00
My question is how am i going to find the value 880.00 (August) & replace it with a new value?
Is it possible for me to open & edit the same file without creating s new one?
View 5 Replies
View Related
Aug 13, 2014
Its my 1st time using fopen,fprintf and others and i cant seem to edit my file via fprintf! Heres my program:
Code:
#include <stdio.h>
#include <stdlib.h>
char letter,check,nought,bleh,hi,a;
int main()
[Code]....
View 2 Replies
View Related
Aug 7, 2014
how to change a certain part of a text file? I want to +1 to a text file every time the user does a particular input. For example my text file has name << password << count . When the user logs in and choose option 1 the program will +1 to the count.
for e.g. Bob Bob123 1
when he logs in and chooses option 1.
it will change to Bob Bob123 2
View 3 Replies
View Related
Feb 12, 2015
What i'm trying to do is compile a text file to an executable, but the problem is that I want to be able to edit the resource file while in runtime, for example write something on a textbox, hit compile and get the executable file edited by the texbox.
Here's my codedom:
public static bool Compile(string sourcefile, string exefile) {
CSharpCodeProvider ccp = new CSharpCodeProvider();
CompilerParameters cp = new CompilerParameters();
cp.ReferencedAssemblies.Add("System.dll");
[Code] ....
Is there anyway I could do that?
View 2 Replies
View Related
Sep 27, 2014
I have problem with using ShellExecute For a simple calling ShellExecute I am using
ShellExecute( NULL, "open", "test.pdf", NULL, NULL, SW_SHOWNORMAL );
and I am able to open test.pdf file in working dir.
How can I use Edit box and put inside some name of file and after that use ShellExecute(with button...) and open file which name I typed in Edit box
I am using Borland Builder C++ 6.0
View 7 Replies
View Related
Mar 29, 2014
I would like to ask about editing proccess memory.For example,I would like to create some program for a multiplayer game which I play.How do I work with memory adresses and what are commands for it.
View 1 Replies
View Related
Jul 6, 2014
I'm trying to edit an existing xml file but with no luck. I'm new to xml environment.
This is the xml content :
<?xml version="1.0" encoding="UTF-8"?>
-<mmp>
<ID>aaa</ID>
<clientID>bbb</clientID>
<time>2004-05-10T17:35:41.29</time>
<session>2000</session>
<Answer>Yes</Answer>
-<Program>
<_id>ppp</id>
</mmp>
I'm trying to change the time and id values and can't do it.I tried almost anything.
View 4 Replies
View Related
Sep 24, 2013
I'm trying to take a value from an edit box and display it in the edit box as hex. I'm using this code:
CString buffer;
int intbuf;
m_edit[5]->GetWindowTextA(buffer);
intbuf = atoi(buffer);
buffer.Format("%02X", intbuf);
m_edit[5]->SetWindowTextA(buffer);
If I include the last line of code here I get a stack overflow error. If I don't include it, I can run through the debugger and the buffer CString is converted to hex just like I want, I just can't display it because I get that error.
View 4 Replies
View Related
Nov 27, 2013
I am working on this project where I need to update an edit box every couple of seconds with a status and based on the status I need to change the color of the background to a particular color.I am able to update the edit box with the status but is clueless on how to update background color.I have read some info on line about this but is confused.This edit box is on a tab in a dialog. Also, on this tab is a Groupable List Ctrl.
View 2 Replies
View Related
Nov 14, 2014
I have this project for school where I basically need to write a program that will take any text file and convert it into html code.
string line;
int lineCount = 0;
while (!inFile.eof()) {
getline(inFile, line);
cout << line << endl;
lineCount++;
}
cout << lineCount - 1 << " lines of text read in this file." << endl;
I have this block of code to print each line of the text file into the terminal window and count the number of lines printed. But I don't know how to make it change a single character or set of characters to something else. For example, if a line of text begins with the number "1", I want to be able to change it to "<h1>".
View 2 Replies
View Related
Jan 5, 2015
I have a report that's generated by a piece of software, and (I'm assuming because it was intended for Linux/Unix) when I open to read it in notepad, it has a bunch of funky symbols in it, and incorrect line feed characters instead of returns that windows uses.
I looked at the txt file with a hex editor and can see all the hex codes for the symbols I want deleted. One of the symbols 0A.
How can I do a "find and replace" command but do it with hex codes? These symbols cant be simply placed into my code file because VS does not know how to interpret it.
View 7 Replies
View Related
Jul 19, 2014
I have made a datagrid in a WPF and added a button to add rows, here is the code for that:
this.itemListDataGrid.Items.Add(new TextBox());
Also, I have already got 3 colums in the datagrid pre-added by me, so when the rows are added I click on one to edit it and it comes up with error edit item not allowed.
View 7 Replies
View Related
Apr 17, 2015
Is it possible to edit the message map at startup instead of just having it set at compile time?
I'm reading some values from an XML file at startup. The menu options will be determined from what I find in there. But I need to assign those menu options to the message map.
View 8 Replies
View Related
Dec 16, 2013
I'm trying to create an edit box in a CView.So far, this is how far I've gotten:
With this code
Code:
// .h
CEdit m_MyEditField;
// .c
m_MyEditField.Create(WS_CHILD | WS_VISIBLE,CRect(40,40,500,Y+55),this,0x1552);
m_MyEditField.SetWindowText("this is my CEdit field");
As you can see, the edit box doesn't look like the ones in a dialog, which is what I'm trying to accomplish.
Is there possibly some other class I should be using for the edit box?Or another setting for .Create?
View 2 Replies
View Related
May 5, 2014
I am working on a program that will do several mathematical calculation and will store the data into a csv file.The one below is just a prototype version of this.In my program,I will store my csv file as (current-date).csv using time.
With this in mind,I want my program to first check does (current-date).csv already exists.If not,the program runs normally and output all the data into the csv file.
However if (current-date).csv already exists,I want my program to read and edit that particular csv file,by skipping part1 in my code(name,id N etc.) and start with prompting the user for numbers straight-away.
In other words, if (current-date).csv already exists,the user should continue outputting the numbers from where the user last left before last termination instead of outputting the name,date & etc into the csv file again.
Eg: if no=22, continue inputting values from no=23 till terminating the program again and storing the values correctly into the csv file.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <locale>
#include <string>
#include <sstream>
#include <time.h>
using namespace std;
// Program to read date N store it as currentdate.csv
[Code] ....
View 6 Replies
View Related