Forum: C++ 34 Days Ago |
| Replies: 4 Views: 132 |
Forum: C++ 34 Days Ago |
| Replies: 4 Views: 132 Re: Parrallel array problem Ya i understand what you are sayin, but i tried this
V
if (tax_payers[i] < tax_payers[i+1])
swap(tax_payers[i],tax_payers[i+1]);
after the first if statement but still doesn't assignin them... |
Forum: C++ 34 Days Ago |
| Replies: 4 Views: 132 Parrallel array problem #include <iostream>
using namespace std;
const int capacity = 20;
string tax_payers[capacity] = {"jane", "tom", "jerry", "joe", "annie", "mary", "kate", "steve", "sarah", "paul", "petra",... |
Forum: C++ May 9th, 2008 |
| Replies: 2 Views: 162 Cn't figure out error #include <iostream>
#include <fstream>
#include <string>
using namespace std;
void writeArray();
void readArray();
const int capacity = 4;
//const int spec = 4;
double... |
Forum: Assembly Apr 26th, 2008 |
| Replies: 0 Views: 427 descending bucket sort in 68000 ORG $8000
NUMBERS DS.B 5 ;room for 5 input values
BUCKETS DS.B 11 ;room for 11 buckets
ORG $8100
BKTSORT LEA BUCKETS,A0 ;init... |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 Re: Array with random function When i click on a seat the reference num is given and when i book a new seat a new reference is given, i want to able to cancel both reference numbers in the void cancelseat() but the function only... |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 Re: Array with random function Tried it no good i'm afraid!! well ya cout << reference number should be outside the function, again my programmin skills aren't very neat!! |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 Re: Array with random function #include<iostream>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<string>
#include "cursor.h"
#include <windows.h> //Sleep()
using namespace std; |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 Re: Array with random function Yep removed the break and i removed the max aswell, left that dere by mistake. I still only holds one number, i tink it is cos the new random number generated when i book a new seat overwrite the... |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 463 Array with random function int serials[MAX_PAX];
for (int i = 0; i <MAX_PAX; i++)
{
int max = 0;
serials[i] = randomnum(); // store random num in int serial
max++;
cout <<"serial" << serials[i];
break; |
Forum: C++ Apr 21st, 2008 |
| Replies: 1 Views: 208 |
Forum: C++ Apr 21st, 2008 |
| Replies: 1 Views: 208 int array in c++ const int capacity2 = 120;
int rows[capacity2];
for (int i = 0; i < capacity2; i++)
{
if ( x == 11)
{ rows[i] = 1;
break;
}
else if ( x == 13)
{ rows[i] = 2; |
Forum: C++ Apr 21st, 2008 |
| Replies: 4 Views: 253 Re: char array? Yep working perfectly now, thanks a million!! Saved me there now i can process the rest of the array program. |
Forum: C++ Apr 21st, 2008 |
| Replies: 4 Views: 253 Re: char array? Tanks that solved some of it, but why is it cout this ╠╠╠╠╠╠╠╠└ instead of the character A! |
Forum: C++ Apr 21st, 2008 |
| Replies: 4 Views: 253 char array? #include <iostream>
using namespace std;
int main()
{
char A,B,C,D;
const char capacity = 120;
char letter[capacity];
int pax = 0; |
Forum: C++ Apr 19th, 2008 |
| Replies: 2 Views: 257 Re: Cursor display problem I need to include the cusor.h library file thought to do the where_mouse(x,y) and gotoxy(x,y). I just don't know why the if statement is implemented fully. it shud stop me clickin on outside the... |
Forum: C++ Apr 17th, 2008 |
| Replies: 2 Views: 257 Cursor display problem Please help i'm trying to click on the screen just inside the box coordinates of (x,y) but it clicks everywhere on the screen!!
void cursorpoint()
{
#include "cursor.h"
int x ;
int y ; |