Forum: C++ May 11th, 2009 |
| Replies: 6 Views: 406 Ok will do, thanks for all your help!! |
Forum: C++ May 11th, 2009 |
| Replies: 6 Views: 406 Thanks fixed it up it compiling now only for the ( error, i'm using the right syntax for entering and displaying struct
cin >> pArray[i].prodId;
success = insert(&aQueue, &pArray[0] );
but... |
Forum: C++ May 11th, 2009 |
| Replies: 6 Views: 406 the_Queue->Q_Array[++the_Queue->rear] = item;
it say illegal conversion from int to product * for this line
and expected (
getline(cin,pArray[i].prodName); for this line its highlighting the... |
Forum: C++ May 11th, 2009 |
| Replies: 6 Views: 406 Hey, i set up a circular queue to sort and pass ints easy, but having problems passing struct of information to the queue,
wat declaration should i pass to insert function??
Here is my code so far,... |
Forum: C++ Dec 5th, 2008 |
| Replies: 9 Views: 494 Sry man cn't figure it out, no the best at programming myself!! |
Forum: C++ Dec 5th, 2008 |
| Replies: 3 Views: 699 Hey can anyone offer me any advice on updating my customer file, I created the blank records and can create a record in the newCustomer function but can’t seem to access that record again for... |
Forum: C++ Dec 5th, 2008 |
| Replies: 9 Views: 494 Is it a trim function you are looking for?? Deleting the spaces in front of and behind the string is it?? |
Forum: C++ Nov 5th, 2008 |
| Replies: 3 Views: 802 int j = fileName.length();
int endStr2 = j;
int numChars2 = 0 ;
char ch2;
ch2 = fileName.at(j);
while( ch2 !='*' && j >= 0 )
{
j++;
cout <<"i loop "<<j<<endl; |
Forum: C++ Nov 5th, 2008 |
| Replies: 3 Views: 802 Hey i'm trying to use this trim function i wrote but its going wrong for me. I can trim from the front but not behind, e.g. if i enter **bob it works but if i enter **bob** it just prints nothing.... |
Forum: C++ Oct 29th, 2008 |
| Replies: 2 Views: 969 Ohh get you now. Thanks!! |
Forum: C++ Oct 29th, 2008 |
| Replies: 2 Views: 969 I'm trying to append the end of the file treatments.txt but am unsure how to use the while loop correctly!! Any suggestions?? I tried boolean with the whiles aswell but can't seem to get it to work... |
Forum: C++ Jul 16th, 2008 |
| Replies: 4 Views: 416 Yep thanks its workin nw!! |
Forum: C++ Jul 16th, 2008 |
| Replies: 4 Views: 416 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... |
Forum: C++ Jul 16th, 2008 |
| Replies: 4 Views: 416 #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: 419 #include <iostream>
#include <fstream>
#include <string>
using namespace std;
void writeArray();
void readArray();
const int capacity = 4;
//const int spec = 4;
double... |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 1,614 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: 1,614 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: 1,614 #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: 1,614 int randomnum()
{
#include<cstdlib>
#include<ctime>
//First seed the random number generator
srand((int)time(0)); |
Forum: C++ Apr 23rd, 2008 |
| Replies: 14 Views: 1,614 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: 1,614 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: 1,240 Sorry solved the problem myself. Justed needed rows[0] instead! my bad!! |
Forum: C++ Apr 21st, 2008 |
| Replies: 1 Views: 1,240 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: 610 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: 610 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: 610 #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: 662 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: 662 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 ; |