C++ :: How To Create UML Diagram

May 11, 2014

I need to create a UML class diagram for this code

private:
GradedActivity *grades[NUM_GRADES];

public:
void setLab(GradedActivity *activity)
{ grades[LAB] = activity; }

View 1 Replies


ADVERTISEMENT

C :: Circuit Diagram - Programming A Timer

Jan 29, 2014

I have attached a circuit diagram below, which has been tested. Currently you have to manually push the switch to change the brightness of the bulbs. I want to program a chip to automate this.

Over 90 days the chip will output a high signal in replace of the switch every set period of time (say once every 1.5days). I can use any chip but the smaller the better!

View 1 Replies View Related

C/C++ :: Displaying Binary Tree Diagram?

Nov 15, 2014

I am making a Binary Tree program for a Data structures class proyect. The program consist of displaying a Binary tree diagram and also to give the inorder,postorder and preorder of the diagram. I made the program program give me the inorder,postorder and preorder of the binary tree. However I am having problems with the display. I am trying to use breadth first search for the display, and I made the funtion for BFS but I am stuck on how to proceed.My code is the following:

#include<stdlib.h>
#include<stdio.h>
#include<iostream>

[Code].....

View 1 Replies View Related

C# :: Entity Framework Generate From Database Give Blank EDMX Diagram

Aug 27, 2014

Yes, exactly, and I have been successfully creating EF Model before from the same database.... Why is it acting up now... I did check SO and they seems not to have a solution for it also....

View 8 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# :: 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 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 And Use DLL

Oct 23, 2013

I've been programming for a while but. I've never made or used a DLL before.

Edit: In eclipse.

View 2 Replies View Related

C :: How To Create An Object

Oct 31, 2013

I have an assignment that asks me to implement a variant of the classic bouncing balls program.

'Each ball should start off at the top of the screen with a random speed in the x direction. Whenever a ball hits a screen boundary it should bounce off at an angle equal to the impact angle and lose some speed. Eventually each ball should come to a rest at the bottom of the screen. Five seconds after coming to a rest a ball should be removed from the screen.'

'Your code must keep track of objects (balls) by placing the object data structures in a linked list. You need to create your own linked list implementation. Below is a brief description of the object programming interface: CreateObject - Create a new object. The function accepts as input parameters a pointer to the SDL screen, a pointer to a model triangle array, and a variable telling the size of the model triangle array. The function returns a pointer to a new object data structure. The model triangle array specified as input parameter should not be shared across objects. (Not sharing the model triangle array allows e.g. objects to have different colors.)

Perform the necessary memory allocation and copying.DestroyObject - Free object. The function accepts as input parameters a pointer to an object data structure. The function should free all memory allocated to represent the object (memory allocated for the model triangle array and the object data structure itself).

Drawobject - Draw object on screen. The function accepts as input parameters a pointer to an object data structure. The function must draw the object on the screen by calling DrawTriangle on each of the model triangles. Remember to update scale, translation, etc., in each triangle data structure before invoking DrawTriangle.

Hint: Do not make the bouncing algorithm too complex. Bouncing a ball off a vertical or horizontal surface can be accomplished without resorting to calculating impact angles.'

The function I'm stuck at, is the first one - createobject.

My first aim is to get one ball on the screen.

Code:

// Create new object
object_t *CreateObject(SDL_Surface *screen, triangle_t *model, int numtriangles)
{
object_t *object = malloc(sizeof(object_t));
object->model = malloc(sizeof(sphere_model));
object->screen = SDL_Surface;
memcpy(*model, object->model, sizeof(object_t));
return object;
// Implement me
}

This is what I've done so far.

View 4 Replies View Related

C :: Create A Box Outside Array?

Dec 1, 2013

I am trying to create a box outside my 9x9 array. However, my box did not cover up everything.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <conio.h>

#define row 19
#define col 19

[Code] ....

View 6 Replies View Related

C++ :: How To Create A Timer

Jan 24, 2014

#include<iostream.h>
#include<time.h>
#include<conio.h>

[Code].....

View 3 Replies View Related

C++ :: How To Create A Database

Feb 28, 2013

I'm trying to make a database that stores the information without overwrite it. I want this program to store the client’s selection in somewhere that doesn't change and also that creates a new storage for the new value any time the client enters a new selection instead of overwriting it. I did something like that in my code but any time the program runs again and the client enters a new selection, the client’s selection is overwritten with the new value. I don’t know if it’s possible to do that (store the client’s selection in somewhere where doesn't change) with C++. I've been reading and I think I can create a database for my program.

THIS IS MY CODE:
#include <iostream>
#include <string>
using namespace std;
// FUNCTIONS

[Code]...

View 2 Replies View Related

C++ :: How To Create And Use DLL In Eclipse

Nov 21, 2013

I'm trying to find out how to create and use DLL's in eclipse.

I know general C++, library but i cannot figure out DLL's.

View 1 Replies View Related

C/C++ :: How To Create A Folder In MFC

Oct 21, 2014

How to create a folder in mfc ..

View 1 Replies View Related

Visual C++ :: Create MFC OCX Using DLL

Aug 28, 2014

I am trying to create a OCX from a C++ dll., Here's the scenario I have a C++ dll and this dll needs to be called in VB.net program my boss want's me to create an OCX out of this.

C++ dll and use it in a VB.net class library, apparently I have created an OCX but it requires a form but the VB.net program is a class library.

View 5 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++ :: How To Create A Singleton Class

Oct 6, 2013

I've tried to program a Singleton class. But the problem is that I don't know how to access the g_pInstance() function. Because this is not working because the constructor and deconstructor is private:

Singleton::g_pInstance()
Code: #include <iostream>
using namespace std;
class Singleton
{

[Code]....

I'm not sure of how to access any object, function, variables in the class when you are using a Singleton. How do you access that?

I'm just asking because I want to know how to do that if I have to use a Singleton sometime when I'm programming.

View 5 Replies View Related

C++ :: How To Create Array Of Nodes

Feb 10, 2015

I am trying to see if I can create an array of nodes. I think I have it down somewhat but this is what I have.

Code:

#include <iostream>
using namespace std;
/*This is a template of a person....sorta*/
class person{
public:
int data[32];
bool selected = false;
person(){

[Code]...

I am trying to see if there is a way for me to create a 86 slot array of person nodes. I am not sure how to do it and how to access them afterwards. I know that I am creating the bitstring of person correctly but I am not sure how to get the array of person going.

View 7 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 8 Dimensional Array

Dec 19, 2014

Is it possible to create an 8 dimensional array in C? If no, then what can I do to improvise or let say bypass the limit?

View 7 Replies View Related

C :: Create A Menu With Program

Oct 29, 2014

So, I was trying to code a menu for a personal movie database. But I'm having some problems.So, this is what I did,

Code:
#include<stdio.h>
int main();
{
do
{printf("Menu

[Code]...

But this is not working.Furthermore I would also like add a sub menu.

View 7 Replies View Related

C :: How To Create Array Of Arrays

Nov 3, 2014

I wanted to do this: Accept a line of input from user and save it to an array1 and copy its contents to other array in a set of arrays and then input another line to array1 and then copy it to next array in the same set and so on.... I know it is confusing but I can put it like that I want to create an array of arrays (Set of arrays). How can I do so?

I wrote a code to input the line in an array and tried to copy it another array of pointers, but pointers are just addresses so the same adress is copied again and again so, all the pointers of the array point to one address only. The code doesn't print anything when I try to print all the lines that were saved.

Code:
#include <stdio.h>
#include <stdlib.h>

#define MAXLEN 1000
#define MAXSIZE 100

int getline(char [], int );
void storage(char line[]);

[Code] .....

View 2 Replies View Related

C :: How To Create Functions Such As Floats

Sep 16, 2014

I am new with C programming and trying to learn how to create functions such as floats. But for some reason when I try to compile this program the compiler will tell me Weight() is not a function.

Code:
#include <stdio.h>
float Weight(float Mass, float g)
{
float Weight = 0;
g = 9.81;

[Code] ....

View 3 Replies View Related

C :: Program To Create 2D Array For Each Row

Feb 14, 2013

What I am trying to do is to have the program create 2D array that for each row, no two numbers are the same and only consists numbers between 1-9. The array lists out every possible combinations. Supposely I do not know the number of possible combinations, I had it keep adding new rows until there are no more possiblities left.

The problem with my code is when I print out the completed array, it gives out really, really large numbers. But when I print the array from inside the first loop, it gives correct values. I do not know exactly what happened.

Code:
#include <stdio.h>
int main(void) {
int double_digit[1][2];

int a = 1;
int b = 1;

[Code] ....

View 5 Replies View Related

C :: How To Create Packet Data

Jan 8, 2014

How can header info 'foo' be combined with data in buffer 'buff' to pass to sendto function

Code:

/* Send a single RTP packet, converting the RTP header to network byte order. */
int sendrtp(int fd, struct sockaddr_in ........ockAddr, struct rtpheader *foo, void *data, int len)
{
char *buff = alloca(len+sizeof(struct rtpheader));
foo->b.sequence = htons(foo->b.sequence);
foo->timestamp = htonl(foo->timestamp);
foo->ssrc = htonl(foo->ssrc);
}

[code]....

View 2 Replies View Related

C :: Create 2 Int For FOR Loop To Do Encryption

Jun 15, 2014

what i think i need to create 2 int for the FOR loop to do the encryption but how am i to do it meaning the actual encryption itself what is that i check with?Also i think i need more than just the #include <stdio.h> library due to the file functions that i will need or is C having them built in? Also what is that about the program doing all this from DOS?

Create 2 programs with the names encrypt and decrypt that will encrypt and decrypt files respectively.The encryption and decryption will be done through a command line of DOS and the program should be as follows: encrypt file1 file2 key and decrypt file1 file2 key

Where:
file1 is the source file
file2 is the destination file
key is the word with which we encrypt/decrypt file1

So when the user executes the command encrypt f1 f2 sunnyday the program will create a file with the name f2 which will have the contents of f1 encrypted with the key sunnyday.When the user executes the command decrypt f1 f2 sunnyday the program will create a file with the name f2 which will have the contents of f1 decrypted with the key sunnyday.

If the user gives a wrong key the program will continue to decrypt file1 but since the key is wrong the results will be unexpected.Finally the program must print the corresponding error messages in case of errors for example (There is no file 1).The program is expected to work corectly with not only plain text files but executable (exe) files etc.Also The program must be fully commented.

Note: The way the encryption will work is yours to choose but it is recommended that you encrypt every letter of the file with every letter of the key with the (start to finish and begin) technique meaning that if the key has 8 letters then the first leeter of the file will be encrypted with the first letter of the key, the second letter of the file with the second of the key, ..., the ninth letter of the source file with the first letter of the key, the tenth letter of the source file with the second letter of the key etc.

View 3 Replies View Related







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