C :: Use Names Of Taxi As Registration Instead Of Numbers?

Apr 15, 2013

ive done a code for taxi's that arrive and depart, but i was wondering how i can use names of taxis as registration instead of numbers?

View 1 Replies


ADVERTISEMENT

C++ :: Sorting Names And Numbers And Also Using Templates

May 7, 2013

For my project I have to sort 5 numbers and 5 names using a template bubble sort. I have one header for the numbers, and one for the names. This is what I have so far for my testing page:

#include "Floatheader.h"
#include "Nameheader.h"
#include <string>
int main ()
myFloat obj1;
myFloat obj2( 2.2, 5.1);

[Code] .....

I have to create a template to look like this: template<>....with a class inside the arrows. Then, I have to use bubble sort to sort the 5 names and number objects I have created. Sorting the names and numbers and also using templates?

View 1 Replies View Related

C++ :: How To Store Names And Numbers In Array

Jul 25, 2014

Can names and numbers be stored in one array ? Like a telephone directory?

View 1 Replies View Related

C# :: Replacing Names With Unique Numbers

Oct 27, 2014

I have a dataset which is a coauthorship network (a .txt file).I want to replace all the names of the authors with a unique number(no matter what the number is but it's important these numbers should be unique).

I've opened the dataset in excel then copy the author's names to another excel file,then I want to replace the authors names with their row numbers. what should i do?

View 3 Replies View Related

C/C++ :: Possible To Append Numbers To The End Of Variable Names During Runtime?

Dec 6, 2012

I am trying to write a program that would convert numbers of base 10, decimal numbers, to binary or hexidecimal numbers, base 2 and base 16. I want the program to run a loop through the various numbers input and store each number converted to the new type in a separate variable with the same basic name but different last letters/digits to differentiate between them and add them to the total.

Basically, I'm saying that i have the user input a number and letters. Let's say 15, d, b. So they want to convert 15 of decimal type to binary.

The program would then take the variable used to hold that number, and the other to variables to decide what function to perform on the number.

Then I will already have a variable initialized for the 3 possible conversions (binaryKey[], decimalKey[], hexideciKey[])

Then I want it to convert it and store the number at different places in the array to form the final number. Although, there is no way to predict what number the user will input, so there is no way of knowing initially where the converted place-value will need to be placed in the array.

I was wondering if there was a way to have the program run a loop where as the progression continues, it appends a number to the end of a universal name for the variables and then adds them together in the correct order creating the sequence that means that number.

In simpler terms:

Input a number: 15
Input type of base: d
Input converted type: b

Program then continually divides the number by 2, storing the remainder in a new variable

Such as: for(int i=1, i < (str(number).len), i++){
when i = 1, you would get
int number1;

[Code] ....

and so on. Is there a way to do this???

View 5 Replies View Related

C :: Program To Simulate Taxi Rank Implemented As Queue Via Array - Linked List

Mar 26, 2013

I have an assignment where i am required to code up in C, a program to simulate a taxi rank that is implemented as a queue via an array that can hold up to a maximum of six taxis.When a taxi arrives, it joins the rear of the queue. When a taxi departs, the first taxi in the rank is used and its departure is logged.A "rolling menu" comprising integer codes as specified below is used until 0 is entered to exit the simulation. I've done this stage but now the next stage is asking me to implement the queue as a linked list. what the difference is between an array and a linked list and what is a linked list?

View 2 Replies View Related

C# :: Registration Object - Return Boolean Value

Sep 10, 2014

Requirement: the AddRegistration method in the RegistrationDB class should accept a Registration object and return a Boolean value that indicates if the operation was successful

a brief overview. Form with two combo boxes and a button, when you click the button the data from the combo boxes is entered into a table in the connected database...

View 14 Replies View Related

C++ :: Sort By Name / Surname / Registration Number And Grade

Apr 15, 2014

I have a text file containing the names and surnames of enrollment numbers and grades of students , looks like this:

RIKI Rikic E2345678 10
JUPI jupic E1232345 9
  Etc ......)
 
I'm interested in sorting by name and surname, registration number and grade.My example:
 
struct student {
string name;
string surname;
string enrollment;
int grade;
};
 
and in the main program
int main () {
Student STUDENT;
 
/ / Code to read a text file that I wrote so I have ...
 
switch ()
case '1 ': / / sort by name
case 2: / / by surname
Case 3 / / by enrollment
Case 4 / / by grade
 
this sort we are not going very well .

View 1 Replies View Related

C++ :: Student Registration System - File Updating

Feb 14, 2012

I have been creating this program for a student registration system. For the file handling So far I can write in to a file , view all records, and search a single record. now i got the problem with updating details . my coding is as bellow ..

void file_update() {
int r;
struct student stu;
fstream stu_file;
cout <<"========Update Record======"<< endl;
stu_file.open("student.txt", ios::app );

[Code] ....

My problem is it won't update the record. it just adding a new record.

View 9 Replies View Related

C/C++ :: Program To Make User Login And Registration Using Textfiles?

Nov 21, 2014

why it doesn't enable to register except one time

View 1 Replies View Related

C++ :: Delete Specified Names From A List Of Store Names?

Feb 10, 2013

i have a vector of stores. i would like to delete the specified choice(store) from the list. Here is what i have but my erase statement is wrong and wont compile.

void Store::deleteSpecifiedStoreFromList(string choice) {
for (int i = 0; i < this->stores.size(); i++) {
if(this->stores[i].getStoreNames() == choice) {
this->stores.erase( std::remove_if( this->stores.begin(), this->stores.end(), choice ), this->stores.end() );
}
}
}

View 4 Replies View Related

C :: Array Of File Names

Feb 9, 2013

I am trying to create an array of file names such that when I want to open one of the files, who's name is given in the array, I can call that element of the array. My code for making the array is the following,

Code:
char file_name[40];
char *file_locations[N]; // array of N names (*)
for(ii=0; ii<=N-1; ii++){ // printing the names of all the files P1_8mag_1.txt - P1_8mag_N.txt
sprintf(file_name, "P1_8mag_%i.txt", ii+1);

[Code]....

The problem with this is that in the first step: all elements of the array "file_locations" are the name of the last file in the loop (in this case "P1_8mag_N.txt")What is wrong with this?

View 12 Replies View Related

C :: Display The Names In A Queue

Mar 12, 2014

I have an assignment that needs to display the names of customers to be served according to a sequence. coding to display the names accordingly?

Code:

#include <stdio.h>
#include <stdlib.h>
#define MAXIMUM 20
void create();

[Code].....

This is my output. I have trouble displaying the names of the customers as it outputs null when I try to display my position in queue.

View 4 Replies View Related

C :: Pointer - How To Accept 50 Names

Mar 24, 2013

char *name[50]

How to accept 50 names using above definition...

View 3 Replies View Related

C++ :: Sorting Car Names According To Their Mileage

Feb 24, 2013

All I wanted to do is to sort the car names according to their mileage. And display the output with their car names. This is what I've made

#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int j;
class car

[Code].....

I need to take 5 car details and sort them according to their Mileage..

View 4 Replies View Related

C++ :: Splitting First And Last Names From String

Jan 15, 2013

The following code shows bad memory access error (segmentation fault) when I run it. It does this right after it asks for name and the user has entered it.

#include <iostream>
#include <sstream>
using namespace std;
struct Name {
string first;
string last;

[Code] ....

View 4 Replies View Related

C++ :: Find A Name In Struct Of Names

Jul 6, 2014

I cannot find the second name in the struct. First name comes out ok here is the code. I am reading from a file.

struct asma{
char name[200];
char birth[100];

[Code].....

View 2 Replies View Related

C# :: How To Get Column Names From Db3 File

Oct 2, 2014

I have .db3 file, and he has 14 tables,and every table has certain number of columns. Example i have table called "BASIC_INFO" and that table has columns "First Name", "Last Name" and "Age".

How can i get name of table and name of every column,so if i some day add column "Male" i get name of this column too. I need first to calculate number of columns,put that in some integer, and then for example create string array which will contain : array[0] = "First Name" ,array[1] = "Last Name"...

SQLiteConnection myConn = new SQLiteConnection("Data Source=" + DB3Path + ";Version=3;New=False;Compress=True;");
//string query = "Select * From " + DB3Path + ".INFORMATION_SCHEMA.COLUMNS";
string query = "Select * From BASIC_INFO.INFORMATION_SCHEMA.COLUMNS;";
SQLiteCommand sqCommand = new SQLiteCommand(query);

[Code] ....

I tried this too:

string query = "select * from INFORMATION_SCHEMA.COLUMNS"
+ "where TABLE_Name='BASIC_INFO'"
+ "order by ORDINAL_POSITION;";
string query = "SELECT TOP 0 * FROM BASIC_INFO";

View 2 Replies View Related

C/C++ :: Display Names In A Queue?

Mar 13, 2014

I have encountered errors when trying to display the customers' names in a priority queue.

#include <stdio.h>
#include <stdlib.h>
#define MAXIMUM 20
void create();
void priority_insert(int data);
void check(int data);

[code]....

I have gotten the following output:

Peter
Peter
<Null>

How do I correct my coding to display like below:

John
Peter

View 1 Replies View Related

C/C++ :: Sorting 10 Names And Searching For One

Mar 5, 2015

So I been asked to write a program that does the following:

Write a program that allows the user to enter a series of 10 names from the keyboard and then sorts and prints the names in alphabetical order. Use a series of functions:

1) Input the data
2) Sort the data (use a bubble sort)
3) Print the data

After this is done, allow the user to enter a name from the keyboard and determine if the name appears in the list. Use a function to accomplish the search. The name to be searched for should be input within main and sent to the function as an argument.

4) Search the data (use a binary search of type bool)"

this is whats I wrote so far and its giving me error with the sorting and the searching, I need to fix it and I cannot figure out how?!.

#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
void bubbleSort(string[], int);
int main()

[Code]....

View 3 Replies View Related

C/C++ :: Sorting Names In A Structure?

Sep 26, 2012

I cannot manage to get the code for sorting the names in alphabetical order.

#include<stdio.h>
#include<string.h>  
typedef struct{
    char criminalName[10];
    char criminalCase[20];

[code]....

View 3 Replies View Related

C++ :: Get 15 Names And Then Hash Them - Segmentation Fault

May 3, 2013

The point of this code is to get 15 names and then hash them. After one name is entered I get a segmentation Fault and the program crashes.

Code:
//driver file
#include <iostream>
#include <vector>
#include <string>
using namespace std;

[Code] ....

View 7 Replies View Related

C++ :: Finding Names That Start With A Certain Letter

May 30, 2013

I am doing a homework assignment. I do not want the complete answer, just a hint. I have to load a file of names into an array, display the names, then sort the names alphabetically, display them again, then list how many names start with certain letters. I have everything done but how to display how many names start with a certain letter.

Here are the names:

Collins, Bill Smith, Bart
Allen, Jim
Griffin, Jim
Stamey, Marty
Rose, Geri
...........

And here is the code I have so far.

Code:
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <algorithm>

[Code] ....

View 5 Replies View Related

C :: CLASS Keyword In Function Names

Sep 24, 2014

I'm trying to read a C code, but there are functions including CLASS word at the titles of functions. Is it a correct implementation?

For example: double CLASS getreal (int type)

What is the meaning of CLASS in titles of functions in C? I could not find such an usage in my C book?

View 6 Replies View Related

C :: Using Variable Names When Calling MC PIN High Or Low

Feb 9, 2013

I haven't tried to run my program yet, but maybe I will save some trouble if I ask this question first.I am using MC PIC16F690, and I could make a pin high or low by writing RCx = 1 or 0, where x is the pin in the C port. However, I want to use the counter variable from a for() loop as the pin number. Will RC(variablename) = 1 work, or is there another syntax?

View 2 Replies View Related

C :: How To Generate Random Color Names

Sep 7, 2013

I want to print different color names for "nb " times . I get the number " nb " from the user or from text file . if " nb = 3 " then I want to print any 3 different color names which means that I may print ( red , green , blue ) for example . and if " nb=5 " then I have to print any five different color names ( pink , blue , black , red ,white ) fore example .

Note : " nb " may be a large number ( 17 for example ). How can I do this ?

View 2 Replies View Related







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