C :: Program That Allows A User To List All Create New Items

Dec 30, 2013

i want to create a program that allows a user to list all create new items, list those items, delete an item, modify an item, search for an item how can i do that This is my work so far

Code:

#include <stdio.h>
#include <string.h>
struct listofitems
char itemName [50];
float itemPrice = 0;
}

[code]...

View 1 Replies


ADVERTISEMENT

C++ :: Create A Program That Is Able To Save Database Of Items To File On Hard Drive

Mar 18, 2013

Write a program that is able to save a list of items such as books, CDs, or DVDs and the items that are saved must have attributes associated with them. For example a book has a title, author, publisher, and ISBN.I would like to create a program that is able to save the database of items to a file on the hard drive and also retrieve it from the hard drive.I have this for a start of how to set up a storing program.

#include <iostream>
#include <iomanip>
using namespace std;
int main () {
const int arraySize = 10;
int a[arraySize] = { 2, 6, 4, 10, 12, 89, 68, 45, 37 };
int i, hold;

[code]....

View 2 Replies View Related

C++ :: Program To Save List Of Items With Associated Attributes

Nov 22, 2012

I'm supposed to write a program that is able to save a list of items such as books, CDs, or DVDs. The items that are saved must have attributes associated with them. For example a book has a title, author, publisher, and ISBN.

I'm supposed to create a program that is able to save the database of items to a file on the hard drive and also retrieve it from the hard drive.

The user should be able to

1. Enter items
2. Display a list of the items
3. Save the list to disk
4. Read the list from disk
5. Sort the list
6. Exit the program

I know I should use arrays and structs but I don't where to start.

View 2 Replies View Related

C++ :: Program To Create A Dialog Box And Shows It To User

Dec 20, 2014

I want to make a programs which creates a dialog box and shows it to the user. The dialog box should not be pre-loaded, here's an example:

cout << "Button a"
cin >> a
cout << "Button b"
cin >> b
cout << "Button c"
cin >> c

[Code] .....

Each button should be under the other. How can I do this in a C++ project?

View 1 Replies View Related

C++ :: Program To Create Integers As User Requests?

Nov 19, 2013

I know it would be easier to create an int array, but I want the program to create integers as the user requests. For example, if the user enters 4, the program creates 4 integers with the names input. Each integer is better as an individual integer, not an element in an array.I'm not sure if this is a possibility with C++.

View 3 Replies View Related

C++ :: Create A Grading Program That The User Inputs A Name?

Feb 17, 2013

I want to create a grading program that the user inputs a name and then on that value (name) there is a vector of doubles to represent his/her mark and then calculates an average how would I go about doing this?

View 1 Replies View Related

C++ :: Create A Program That Will Prompt The User For Input?

Dec 28, 2014

I need to create a program that will prompt the user for an input, then it will save their input to a file and then it will prompt the user to input "Open" and then the file containing their first input, will open up and show their input.

View 19 Replies View Related

C :: Create A Program That Prints A Number Of Dots Specified By User

Oct 8, 2013

I'm trying to create a program that prints a number of dots specified by the user, there 4 options to do any loop type or to exit the menu. i'm having problems making it so that after you enter a value and it displays the specified number of dots it clears the results. Also we have to make it so that if a negative integer is entered it still prints out the appropriate amount of dots ie: user puts -9 it prints 9 dots, i know you use the abs() function but it doesn't seem to be working for me. I'm assuming my problem with the abs function is i'm not using it correctly. Use case 1 as the example for the rest because I'm trying to implement everything on one case at a time

Code:

int main() {
//initialization statements
int Num1 = 0;
char dot = '.';

[code]....

View 7 Replies View Related

C++ :: Create A Program That Will Let User Input Amount In Form?

Jan 4, 2014

Figure this out using [TURBO C]

Create a program that will let the user input an amount in the form (367). The Program should determine the no. of coins for each dominations : 50,25,10,5,1. (using Turbo C)

View 7 Replies View Related

C++ :: Create Program That Has User Input 5 Digit Number?

Mar 9, 2013

Im trying to create a program that has the user input a 5 digit number. If it's between 10000 & 99999, it will do one thing..(just saying 'yes' for now. Outside those numbers will prompt the user to input again. However, if the user inputs the exact digits 76087, it should display 'term'.

This current code is displaying 'term' whenever the user inputs the 5 digits.

Code:

#include <iostream>
using namespace std;
int main() {
int pin;
cout << "Welcome to Movie Food
Enter your 5-digit pin code: " ;

[code]....

View 14 Replies View Related

C# :: How To Stack List Items

Nov 18, 2014

I do some research about getting the coordinates from the list items but without success. I would like to make that when i press down my mouse button that little blocks fall "out" my mouse and stack on top of eachother.

that first works. When i press the mouse button i draw squares and the fall to the bottom of the screen, but the stack part not.

here is my code:

using System;
using System.Collections.Generic;
using System.ComponentModel;

[Code]....

View 14 Replies View Related

C++ :: Create A Program Which Prompts For User Input Of Current And Birth Date

Sep 27, 2014

I have an assignment in which i must create a program which prompts for user input of current and birth date, which will compare said dates and output if its your birthday or not. I've completed a large portion of it, but cannot figure out how to get the user input of month as an integer such a 2 into February.

#include <iostream>
using namespace std;
class DayOfYear {
public:
void input();

[code]....

View 1 Replies View Related

C/C++ :: Create A Program That Prints A Certain Number Of Asterisks Based On User Input

Apr 12, 2015

I need to create a program that prints a certain number of asterisks based on user input. The user inputs 5 and I want my program to output "*****". How would I do this in C? I've tried printf("%#**", myvariable) but this does not work it only prints "*".

View 1 Replies View Related

C :: Remove Duplicates Items In List Using Glib

Aug 25, 2014

I have this structures:

Code:

typedef struct {{
GList *presets;
} Settings;
typedef struct Preset preset;
struct Preset
{gchar *name;

[Code]...

I want to remove duplicates items in list if them have same freq value.

Example output with duplicate freq:

PHP Code:
name       freq    unammed      87.80    Radio ZU          92.20    Napoca FM     104.50    unammed     92.20    Rock FM      102.20 

Want output:

PHP Code: Europa FM     92.20      unammed       87.80       Radio ZU           92.20          Napoca FM       104.50          Rock FM           102.20 

write code to remove duplicates.

View 10 Replies View Related

C :: Create A Program That Asks User To Input Integer Lengths Of Three Sides Of A Triangle

Sep 6, 2013

C programming: I want to creat a program that asks the user to input the integer lengths of three sides of a triangle, and if so whether the triangle is a right-angled, acute or obtuse one. i am having some doubts about the if, else if statements. I never seem to know how and in what order to use them.

Code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[]){
int SideA;
int SideB;
int SideC;
}

[code]....

View 14 Replies View Related

C/C++ :: Accept Items In Singly Linked List And Sort Nodes?

Jan 11, 2013

i want to make a program that accepts 15 items in a singly linked and sorts the nodes.

View 1 Replies View Related

C++ :: Program To Search Soccer Players Data To Check Whether Name Supplied By User Is On That List

Oct 29, 2014

Write a program that will search soccer players data to check whether a name supplied by the user is on that list. For doing the search, the user may provide either the player’s full last name or one or more starting letters of the last name. If a matching last name is found, the program will display the player’s full name and date of birth. Otherwise, it will display “Not found”.

Requirements specification:At the start, the program will ask the user to enter information about 10 soccer players constituting soccer player data. Each soccer player data will consist of the following fields:

Last name
First name
Birth month
Birth day
Birth year

The user will be asked to enter each soccer player data on a separate line with the field values separated by a space.

Once the data is entered, the program will display a menu of choices as below:

Chose an option:

(1 – input data, 2 – display original data, 3 – sort data , 4 – display sorted data 5 – search by last name 6 – exit the program )

If the user chooses option 1, the program will ask the user for a data and populate the array of structures that will hold the data for each of the soccer players.

If the user chooses option 2, the program will display data in the order provided by the user (original data).

If use chooses option 3, the program will sort data by last name.

If user chooses number 4 the program will display the data sorted by last name.

If the user chooses option 5, the program will ask the user to enter one or more starting letters of the soccer player’s last name. It will then search the soccer player data for the matching last name. If a match is found, it will display the first player found with the matching pattern. If a match is not found, the program will display “Not found”. If the user enters two forward slashes (//) for the last name, it will no longer search for the name. Instead it will display the main option menu.

If the user chooses option 6, the program will display “Thank you for using this program” and will end.

Why my program isint executing correctly. Here is what i've so far . . . .

#include <iostream>
#include <string>
using namespace std;
struct data {
string lname;
string fname;
int birthmonth;
int birthday;
int birthyear;

[Code]...

View 3 Replies View Related

C++ :: Menu Program Broken Down Into Series Of Calls To Function For Each Of Menu Items

Aug 19, 2013

I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.

I want two of the functions to run one of the two programs I am trying to include as items in the menu.

So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.

The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.

View 2 Replies View Related

C++ :: Create User Define Literal?

Jul 14, 2014

In C++ there are a number of primitives that are not defined in terms of other types. By this I'm thinking

int a = 1;
char b = 'M';
float c = 3.45f;
short d = 0xC3A3;

Is it possible to define your own literal? What I would like to do is have a hex literal for a data type where n = sizeof(data_type). If this type were a big integer, then I would want something like:

BigInt e = 0x13CA9B0C98D983E912DA0B0A9F87E0;

My goal is to assign a value from one contingous chunk of bytes and to not do it with a string.

View 1 Replies View Related

C :: How To Create Graphical User Interface

Feb 25, 2013

How can i create a graphical user interface using c

View 10 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/C++ :: Allow User To Create A New Class Instance?

Dec 4, 2014

I am creating a program that allows a user to create multiple 'sequences' and multiple 'filters' and then apply a filter to a sequence.

Each sequence and filter is an array of values.

How do I go about allowing the user to create a 'new' sequence and then store the location so I can access it again later? Once they have created a new sequence they can go on to create another sequence and ten maybe a filter and then another sequence etc etc .. and then they can select sequence 1 and edit the values if they so wish.

They would be asked how many sample values for the sequence, and then I would create a sequence with that many values and an id (1,2,3,4...). They could then enter this id to view/edit the sequence.

The entering/editing values part I am fine with. I just don't know how to allow them to create multiple new instances of a class without using an array so something like..

sequenceClassName somearray[10];
int i;
*create a new array*
somearray[i].create_class(how_many_samples)
i++ //so next sequence they create is 2,3,4.. etc

- this then calls the member function that creates an array using 'sample_values = new float[how_many_samples]' and the user can input their data and edit it whenever by entering the id which will correspond to the somearray[i].

However that approach only allows them to enter a maximum of 11 sequences. It all depends on how big I make that initial array and it just seems like the wrong way to do it.

( how to interact with them, just how to create multiple classes and recall them later to access the data!)

View 2 Replies View Related

C :: Create A Linked List And Then Reverse It?

Apr 9, 2014

I am trying to create a linked list and then reverse it. So far I have created the link list however I am having difficulties figuring out the steps to reverse it. What is the logic behind reversing this linked list. I am not able to use recursion. I am supposed to create a copy of the linked list with the nodes reversed.

Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct charNode {
char data;
struct charNode *nxtNode;
};

[Code]...

View 4 Replies View Related

C++ :: List Of Functions That Can Create A Unique ID

Nov 4, 2014

I'm working on a list of functions that can create a unique ID for a computer. Here's what i have so far:

GetAdapterInfo();
RegOpenKeyEx();
GetVolumeInformation():
CoCreateGUID();

Are there any other functions that do this?

View 1 Replies View Related

C# :: Create A Button For Each Item In A List

Jan 26, 2014

Basically, the program is just sort of a soundboard. The way it is now, it just reads all the names of the files in a particular folder (all .wav files), and then adds an entry to a listBox for each file found. What I would like to do, is instead of a listBox, have buttons for each one. Is there any way to iterate through a list of items and create a button for each one? The main problem I see is placing the buttons. It would have to have some sort of grid to place them in I would imagine...

View 3 Replies View Related

C++ :: Create Fibonacci Sequence With Some User Inputs

Aug 26, 2013

I'm trying to make a fibonacci sequence with some user inputs. I'm using arrays for this, the user inputs are for the Nth term and the starting number (as in the number in front of 0).

My problem is that when the program runs it's an infinite loop which constantly prints the starting number. Which, I think, means that my WHILE loop isn't coming to an end and my 'count' variable isn't increasing.

#include <iostream>
using namespace std;
int main() {
int start;
int term;
cout << "Input a starting number for the sequence: ";
cin >> start;
cout << "
Enter the Nth term for the sequence to reach: ";

[code].....

View 4 Replies View Related







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