C# :: Create Project That Create Automated Backup Of File

Apr 10, 2014

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.

View 4 Replies


ADVERTISEMENT

Visual C++ :: Create X64 QT Project By Default?

Mar 1, 2014

I compiled the source code of QT5.1 to work with Visual Studio 2010.

But it always start off with a win32 project, so that I need to change the settings every time.

How do I kick start with a x64 project by default?

View 1 Replies View Related

C++ :: Create A Class Representing Project Activities

Mar 24, 2013

Create a class representing project activities. In this class include all the required data members and member functions. Each activity should have a record of activity duration, calculated early start, early finish, late start, late finish, free float, and total float. Each activity may or may not maintain a list of its successors and predecessors. Provide your design in UML and implement it in C++ using an interface head file and an implementation source file. I do not understand classes or UML designs.

View 2 Replies View Related

C :: Create Function To Create A Dynamic Array That Fill With Randomly Generated Integers From 0 To 50

Oct 26, 2013

I have a struct called Array and I'm to create a function to create a dynamic array that's fill with randomly generated integers from 0 to 50 (inclusive) and a function to destroy the array for freeing its memory. Below the code that I have written so far.

Code:

* Struct */
typedef struct {int *pArray; //the dynamic array
int length; //the size of the dynamic array}Array;
/* Function to create a dynamic array */
Array *initializeArray (int length) {int i;
}

[code]....

View 7 Replies View Related

C++ :: Automated Incremental File Names

Jan 16, 2014

I need writing code for automated incremental file names. This is what I have right now.

FILE *output;
char output_file_name[ NAME ];
printf( "
Enter an output file name: " );

[Code] ....

View 3 Replies View Related

C++ :: Create Binary Search Tree Template To Be Used To Create AVL Tree

Feb 10, 2013

For my data-structures class, I am attempting to create a binary search tree template to be used to create an AVL tree. I've written a Generic_Tree template for the BST to inherit from, and before I jump into implementing the AVL tree I'm testing the BST member functions. Everything was compiling fine until I added the BST insert() function. Now, I'm getting the following error message from my linker:

undefined reference to 'BST<void>::insert(int, void*)'

Stemming from the call in main line 16.

my makefile compiles with:
g++ -Wall -g Generic_Tree.cpp BST.cpp barfing.cpp main.cpp

Generic_Tree:

template < typename NODE_DATA, unsigned MAX_KIDS >
class Tree {
protected:
struct NODE {
NODE_DATA* contents;
Tree* child[MAX_KIDS];
Tree* parent;

[Code] ....

I'm use to c and havn't used classes or templates before (except for declaring instances of them). The whole syntax is mystifying to me,.

View 4 Replies View Related

C++ :: How To Create A New TXT File

Sep 30, 2014

I think this code should create a test.txt file but I cannot find it ?

Code:
#include <iostream>
#include <fstream>
using namespace std;
int main() {
ofstream ofs;
ofs.open ("test.txt");
ofs.close();
return 0;
}

View 4 Replies View Related

C :: Create File To Write Text And Read Back The File Content

Mar 15, 2013

The Objective Of This Program Is To Create A File To Write Text And Read Back The File Content. To Do That I Have Made Two Function writeFile() To Write And readFile() To Read.The readFile() function works just fine but writeFile() doesn't.

How writeFile() function Works? when writeFile() function Execute It Takes Characters User Type And When Hit Enter(ASC|| 10) It Ask "More?(Y/N)" That Means What User Want? Want To Go Next Line Or End Input?

If "Y" Than Inputs Are Taken From Next Line Else Input Ends.

But The Problem Is When Program Encounters ch==10 It Shows "More?(Y/N)" And Takes Input In cmd variable.If cmd=='Y' I Mean More From Next Line Than It Should Execute Scanf Again To Take ch I Mean User Input.But Its Not!!! Its Always Showing "More?(Y/N)" Again And Again Like A Loop.

Code:
#include <stdio.h>
void writeFile(void);
void readFile(void);
int main(){

[Code].....

View 5 Replies View Related

C :: How To Create A Program That Take AVI File

Jan 26, 2015

I want to create a program that would take an AVI file, alter each frame (ex: change contrast, invert colors, etc.) and dump a new AVI. I've wrote a simple program for this experiment that loads up the header information from the video and dumps it. It also dumps a list of the frame data chunks within the 'movi' chunk.

The info I've gathered from coding this:

1. The recommended buffer size for each type of stream (vids, auds, etc.) is the size of the largest frame of corresponding type, plus 1 or two extra bytes.

2. numFrames in main header is the total number of frames for all types of data (video,audio,etc.) The 'length' value within stream header of type 'vids' is the number of video frames. The sizeImage value within BITMAPINFOHEADER is 921600 (==640*480*3) and the specification states that, quoth, "This can be set to 0 for uncompressed RGB bitmaps."

3. This video uses DIVX encoding.

Now my problem is this: How do I get the data within each video frame in a simple BMP like format? Even the uncompressed frames (with chunk id 'nndb') have variable sizes...let alone the compressed ones.

Information about a software that converts AVIs to a format with fixed sized uncompressed frames. Or at least some information about the frame decompression techniques.

Here's a dump made by the program for a 9 sec, 640x480 video I recorded from Pokemon. (Without the frame dump that is, it'd have made the post too long.)

Code:

AviMainHeader
-------------
size = 56
usecPerFrame = 66666
maxBytesPerSec = 7680000
padSize = 0
flags = 0x00000810
numFrames = 162
initialFrames = 0
numStreams = 2

[Code]...

View 4 Replies View Related

C++ :: How To Create Data File

Jul 26, 2013

How do i create a data file?

View 2 Replies View Related

C++ :: Create BMP File (Grayscale)

Feb 11, 2014

I now have a file with X, Y, Z and Intensity (0-1) of all the pixels. I want to create a .bmp file (grayscale) with this information in C++. How to do it?

View 1 Replies View Related

C++ :: How To Create Header File

Oct 22, 2013

Any good/solid example on how to create a header file?

View 2 Replies View Related

C++ :: Create Texture From File?

Jul 15, 2014

Im having problems with this little function im making

for some reason the texture dont get created (messagebox never gets called)

Im trying to pass a BYTE array of a image to the function

void AddTexture(BYTE* texture)
{
LPDIRECT3DTEXTURE9 Direct3DTexture = NULL;
if (D3D_OK == D3DXCreateTextureFromFileInMemory(pDevice, &texture, sizeof(texture), &Direct3DTexture))
{
MessageBoxA(NULL, "created", "created", MB_OK);
}
}

View 6 Replies View Related

C++ :: Create File With Fstream?

Feb 18, 2014

For some unknown reason when i try the following code it doesn't create a file. (the program will simply get two inputs from the user and then use http to obtain the html/php text and then output it to a file)

code:

#include <SFML/Network.hpp>
#include <iostream>
using std::cout;

[Code].....

View 3 Replies View Related

C# :: Modify / Create Txt File?

Apr 22, 2014

My problem is that I have to modify only some specific details in a txt file (actually it is a wrl file but it can be considered as a txt file). There is a lot of text there but I just need to modify the point coordinates and leave the rest of the text as it is. Reading the "sample file" at some stage we will see some blocks that look like the below:

coord Coordinate {
point [
# bottom
-1.0 -1.0 1.0, #vertex 0
1.0 -1.0 1.0, #vertex 1

[Code] ....

where the numbers are (X,Y,Z) coordinates. What I have to do is to change those figures for (X,0,sqrt(X^2+Z^2)) points. Therefore the expected result (test file) will be as follows:

coord Coordinate {
point [
# bottom
-1.0 0.0 1.4142, #vertex 0
1.0 0.0 1.4142, #vertex 1

[Code] .....

So in my opinion it can be good to have two files: sample.txt and test.txt where the sample file will never be modified whereas the test.txt will be the same as sample.txt but including the modifications as explained above. The idea can be to read the sample.txt, store the info and then start copying each line in the test file until we get to the points coordinates (which needs to be modified) and continuying with this process until the next set of coordinates.

The problem is that I do not know how to change x,y,z coordinates from the sample.txt to (X,0,sqrt(X^2+Z^2)) and to copy them in the test.txt. Please see some code below and the sample.txt file attached.

//Read a Text File///////////////////////////////////////////////////////////////////////////////////////////////////
using System;
using System.IO;
namespace readwriteapp {
class Class1

[code]....

View 4 Replies View Related

C++ :: Create File With Given Size And Then Randomly Access File To Populate It

Feb 17, 2015

I am interested in creating a file of a given size and then randomly accessing the file to populate it. Is there a way to quickly create, for instance, a 4 GByte file in C++, initially populated with garbage?

View 4 Replies View Related

C/C++ :: Pass Path In File Handling To Create Or Open A File?

Jul 14, 2012

I have a folder "pics" in g: drive. There I want to create some text.txt file. Thus, the final path is "g:pics ext.txt".

How can I do that?

View 3 Replies View Related

C :: Create Makefile For A Single File

May 20, 2013

I'm trying to create a Makefile for a single fie ( mycod.c)

What is the syntax?

View 2 Replies View Related

C :: Create File From User Input

Jun 27, 2013

I want to create three files whose names are same but extensions are different. I have to take the name from user. I tried following code but it didn't worked ...

Code:

printf("Name of the file:"); scanf("%s",name);
printf("Format of Input file:");
scanf("%s",ext);
f1=fopen(name.ext,"r");
f2=fopen(name.dat,"w");
f3=fopen(name.src,"w");
f4=fopen(name.RMH,"w");

View 1 Replies View Related

C++ :: Create Array Size From First Value Of File

Jan 2, 2013

I am trying to create an array with the size of the first value of one file wich is the same of the first line because the first line only have one value. Here is how i am trying to do it ...

FILE * fich;
int test;
fich=fopen(nome_ficheiro,"r");
fscanf_s(fich,"%d",&test);
int np=test;
No*aux=primeiro;

[Code] .....

View 3 Replies View Related

C++ :: Fail To Open / Create A File?

Dec 5, 2014

When I write the Ctor as follows, I get an Error: Invalid Sharing Flag 0 (That happens when file exists or does not exist)

File::File(const string& file)
{
m_file.open(file, std::ios::out, std::ios::app);
}

When I write the Ctor as foolows, I manage to open / create a file.

File::File(const string& file)
{
m_file.open(file);
}

What is wrong with option #1?

note that m_file is a data member of type ofstream

View 1 Replies View Related

C# :: How To Create Exe File Along With Database Using VS 2005

Jun 10, 2014

I have created a desktop application using c#.net in visual studio 2005 and sql server 2005, i have created a setup file also but i dont have database in it.. how to include or attach the database file into the project so that it works well in the client machine.....

View 1 Replies View Related

C/C++ :: Create A Autocad Script File?

May 2, 2014

i am writing a program in Microsoft Visual C++ Express. The goal is to create a Autocad script file with this program. The extension of the script file is .scr

Now I first want to create the script file, then edit is and after that save it at a specific location. I want to activate this proces with a button. I have tried many tutorials about creating files but none have worked yet. My questions are:

- How do I create the script file?

- How do I edit it?

-How do I save it?

- Where to put which code?

// PDFScripper.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
#include <Windows.h>
#include <stdio.h>
#include <tchar.h>
#include <WinBase.h>

[code].....

View 5 Replies View Related

C/C++ :: Create Image And Output It As PPM File

Jan 26, 2015

I have an assignment where I have to create an image and output it as a .ppm file. It has to have a black background and have some letters in a different color. My professor told me that my .ppm header should have p3 600 300 255 and P6 600 300 255(what this means, think it sets up the width x height which should be 300 x 600).

This is what I have so far:

#include <iostream>
#include <fstream>
using namespace std;
int main() {
struct pixel {
unsigned char red;

[Code] ....

Problem in first for loop and what it should look like inside of the for loop, after that I should be able to figure this out... with the fstream (how to output the results in a .ppm file).

View 1 Replies View Related

C Sharp :: Create Xml File From Xml Stored In A DB

May 15, 2013

I have a table in my database that has a 3 fields.

RuleID | RuleName | Rule

the ruleID is a randomly generated string of characters, RuleName is the name the user gives to the rule, and the Rule field is about 600 characters long and is just XML text.

I want to read that Rule field from the database and use it inside the function below.

private static List<MenuItem> LoadRules(bool evaluationType)
{
//string path = HttpContext.Current.Server.MapPath(string.Format("/Rules/{0}/{1}/", ip, evaluationType ? "Evaluation" : "Execution"));

[Code]...

This function loads an xml file from a static location and parses out some information to a context menu.

BUt i'm culeless on how to have the function read the xml info found inside my database.

View 1 Replies View Related

C Sharp :: How To Create Excel File In C#

Dec 28, 2013

I am currently having issues with the following code when trying to create a excel file using C#. This is the code that I have at the moment.

    oXL = new Microsoft.Office.Interop.Excel.Application();
            oXL.Visible = false;
            oWK = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
            oWK.SaveAs(path + "" + fileName);
            oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);
            oWS.Cells[1, 1] = "Student ID";
            oWS.Cells[1, 2] = "Student Name";
            oWK.Save();  

The line that I am having issues with is

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);

If I remove it, I am able to create and save teh workbook in the directory. However, I want to make some changes on a worksheet, and that is where the issue is. I have also tried using the line of code:

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets[1];

This line had no luck either. The issue I am having is the error regarding InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.

View 2 Replies View Related







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