csurfer 422 Posting Pro

I may be wrong but as far as I see you are using a single port to receive client requests from , but later when you intend to handle different clients in different threads you have to bind them to a different port for the connection to remain intact and communication to take place. If all threads are linked to the same port and you close that port all the connections are bound to get disconnected.
As its been some time that I have programmed in this field I may have gone wrong somewhere. Do correct me in case I am wrong.

csurfer 422 Posting Pro

Close the thread if you are done with the question.

csurfer 422 Posting Pro

The error message itself says where you went wrong.Initialization of factorPtr in line 14 should be factorPtr(ptr) rather than *factorPtr(&ptr).

csurfer 422 Posting Pro

You want the address of the variables list1 and maxVar to go so your summarr function call be like

result = sumarr(arr, num, maxVarHolder);
csurfer 422 Posting Pro

You have interchanged rows and cols in for loops of your print_array function,and its an obvious core dump. Change that and your code (with the changes I have made in my previous post) works.

P.S : Try to solve such simple problems by looking at your code more cautiously. Its your code, your brain child you should atleast spend some time knowing it :)

csurfer 422 Posting Pro

I just made some small change in your class definition removing the .resize() and fill() functions as I didn't find their need.

template <typename T>
class dyn_arr{
public:
        //Dedault constructor
        dyn_arr() {};
		//Constructor
        dyn_arr( int rows, int cols)
        {
            for(int i=0; i<rows; i++)           
			{
				vector<T> row; // Your mistake was hardcoding int here as vector<int> as it will need vector<string> here
				for(int j=0; j<cols; j++)
				{
					row.push_back("hello");
				}
				arr.push_back(row);
			}
        }

        void print_array(int rows, int cols)
        {
			for(int i=0; i<rows; i++)
			{
				for(int j=0; j<cols; j++)
					cout << arr[i][j] << "\t";
				cout << endl;
			}
        }

private:
        vector<vector<T>> arr;
};

And ya if you are using it as a string array (dynamic) dont forget to include <string> header file.And it works. :)

Fbody commented: Here's a vote back. Good Catch. +4
csurfer 422 Posting Pro

This is definitely not an exam question its a question picked up from some coding competition or as the "Note:" section says that its an assignment as it speaks of the submission and the criteria to be met before the submission.

Anyways these type of question normally follow a format as to number of test cases followed by important data of the question(here N and K) and then the detailed data(Here the blood group).As :

2
4 2
1 1 4 7
6 3
1 4 8 12 16 20

Here it means that it has two test cases as the first line signifies TC's.
Then the test cases follow where first line of TC has N K format then the N dragons blood group in the next line.So on and so forth for all the other test cases to follow. Now you know how to take inputs come up with your algorithm to solve it :)

csurfer 422 Posting Pro

This is definitely not an exam question its a question picked up from some coding competition or as the "Note:" section says that its an assignment as it speaks of the submission and the criteria to be met before the submission.

Anyways these type of question normally follow a format as to number of test cases followed by important data of the question(here N and K) and then the detailed data(Here the blood group).As :

2
4 2
1 1 4 7
6 3
1 4 8 12 16 20

Here it means that it has two test cases as the first line signifies TC's.
Then the test cases follow where first line of TC has N K format then the N dragons blood group in the next line.So on and so forth for all the other test cases to follow. Now you know how to take inputs come up with your algorithm to solve it :)

csurfer 422 Posting Pro

@AncientDragon : Sorry your message was not uploaded when i started writing the post. :)

csurfer 422 Posting Pro

cout always looks out for a type which it can output or another object of its own data type that is "ostream&" but you are passing a void type to it by using the myObject.displayObject() in line with cout.Rectify it and you are done.

csurfer 422 Posting Pro

State your question properly . And show us some code that you have tried to write...

csurfer 422 Posting Pro

@myk45:

Just explaining what gerard4143 said in simple words.

First usage is allowed as what ever usage of pointer you make its still remains a pointer and takes up a standard amount of memory which is normally equal to the size of your integer variable.So it can be defined without any confusions.

In the second usage you are including a variable of the same structure type inside the structure. Now here in order to declare a variable of some data type you need to know how that data type is defined and the data type cannot be unambigiously defined until the compiler knows what all the variables within that structure.So one waits for other and no one gets completed.

But this is allowed

struct A
{
     int a;
     char b;
};
struct B
{
     int c;
     struct A varA;
};

As the definition of A knows how char and int are defined and their memory needs and before structure B is defined the compiler knows how structure A is defined.

csurfer 422 Posting Pro

Before worrying about big things please pay some attention towards small things...
There is a lot of difference between 1 and '1' .
The input you are taking is a character so the cases of switch should be as case '1' : case '2' : and all , else make the input to be taken to a integer rather than a character.

And ya usage of fflush(stdin) is bad. One more point of concern is all the inputs you are taking doesn't actually need a space and hence you don't even need to use getline().You can directly use cin >> temp1; 4 posts without even concentrating on the main problem.This way you will add all the statements in this world but still wont be able to take the inputs.

amrith92 commented: Well Spotted! Man am I blind!! +2
csurfer 422 Posting Pro

OK here it goes.The piece of code provided by you works on the character buffer from which "cin" reads from, rather than the actual number 42.

Take the example of input of number 10.
It is treated as '1' '0' '\n' ,ie 1 followed by 0 followed by 0 followed by no character.

loop 1 : d=10 c not assigned

condition 1) When it enter the loop first condition to be checked or executed is cin.get() which fetches a character in this case '1' .Therefore c='1'

condition 2) c!='2' and d!='4' which is true

condition 3) print d ie here the character '\n' of ascii 10.

So finally you will get a newline. and then d=c

Loop2 : d='1',c='1'

c1) cin.get() therefore c='0'
c2) c!='2' and d!='4' is true
c3) Print d hence prints '1' , then d=c

Loop3: d='0',c='0'

c1) cin.get() therefore c='\n'
c2) c!='2' and d!='4'
c3) print d,therefore prints '0', then d='\n'

Now as there are no more inputs to read in the buffer until the buffer gets newly filled by some other characters the cin.get() waits and hence the while loop waits.
As we have already seen the first input 10 has already been printed and d holds '\n' and waits to print it.

Assume our next input is 42 taken as '4' '2' '\n'

Loop4 : d='\n' ,c= (un-assigned) <same as the first loop condition>

c1) cin.get() therefore c='4'

csurfer 422 Posting Pro

Hi this is the code for life, universe and everything problem, where the program stops only when the user inputs the number "42"

I tried to understand the problem, but could not make it that how the program stops at exactly 42. Any help would be extremely appreciated.

#include <iostream>
 
int main(void) {
char c, d=10;
while(std::cin.get(c) && (c!='2' || d!='4') && std::cout.put(d))
d=c;
}

First thing who told you to take it as a character...??? You just want to stop on 42 right take it as a integer and compare.

csurfer 422 Posting Pro

csurfer...howz that possible...i mean can u give the syntax plz...


william...this isnt working..i tried it out...

Well what I meant was something like this :

#include<stdio.h>
int main()
{
       printf("%d%d",printf("Hello Daniweb"),printf("I am new here"));
       return 0;
}

You would get an output as I am new hereHello Daniweb1313 The inner printf's are not using a semicolon as you can see.

"printf" function returns the count of characters it has successfully output on the console and it processes from right to left internally hence first it print I am new here and then Hello Daniweb and then count of the successfully output characters of each string which in this case is 13 13.

csurfer 422 Posting Pro

This OP deserves an applaud, he is so honest that he is directly giving us his assignment copy and asking us directly to code for him. :D

Really sorry,here your honesty doesn't pay you the code you need.You need to work.Work hard and code yourself.

csurfer 422 Posting Pro

1)

if(input=="A" && input=="a")
//Same applies to all other vowel statements also

2)

a=a++;
//Same applies to all other vowel statements also

The two most foolish statements in your code are the ones shown above.

1) What you really want to do is to compare every character of string input with character 'A' and 'a' . But you are taking the whole "input" string and comparing it with string "a" and "A". That means you will never get anything more than 0.

2) This is a bit complicated concept called sequence points.In case you want to know you can read it.

Generally when we try to manipulate the same variable more than once within a sequence point the result is always compiler dependent.It can be anything.Moreover here a++ alone efficiently replace the whole statement (2).

csurfer 422 Posting Pro

Ive been reading alot of threads and im getting the impression that students asking for help and getting it is like a taboo. "NO homework allowed".... but now i see that there are people on this forum that will help and when i get the a better level in programming i will be willing to help.

You have a very wrong impression about DANIWEB and the culture here... We don't say "No Home Work" we say "We wont help until you put in some effort",and even you would agree that we are not wrong.

We are here to learn and to help others learn. And none here are workless and come here for fun. Everyone is really busy but take some time out to help others who want to learn, so have a bit of patience.

And ya NARUE was the one who guided me when I was new and helped me a lot and DANIWEB is the reason for what I am.

csurfer 422 Posting Pro

You need to pay more attention in your classes.Very silly mistakes.

1)

vowels::vowels ()
{
	int a=0; int e=0; int i=0; int o=0; int u=0; int y=0;input="";
}

Class functions are used to manipulate the variables declared within the class.Here by declaring the variables again you are just removing the whole sense out of it.You just need to initialise the variables declared within the class.

2)

if(input=="A" && input=="a")

If input equals 'A' how in the world can it be equal to 'a' at the same time....??? And && requires both the condition to be true.What you really need here is the"||" "or" and not "&&" "and".

csurfer 422 Posting Pro

May be a printf within a printf would do the trick.Because the inner printf doesn't require the semicolon.

csurfer 422 Posting Pro

Here is your faulty code :

for(;k%5==0;)
                       y++;
k++;

Your k%5 checks if its value is 0 until its not zero k++ executes very well.Once k becomes a multiple of 5 then the for loop

for(;k%5==0;)
                       y++;

Will never quit because you will increase y , and k's value is not altered whatsoever.

csurfer 422 Posting Pro

Definitely no need of looping required.Its a simple four step procedure.

1 ) Read the entire line into the character array say str.
2 ) Check if string length of str is greater than 22 or not.
3 ) If no then cout << str ; .
4 ) If yes then str[22] = '\0' ; and then cout << str ; .

Loop through the above 4 points until end of file.

csurfer 422 Posting Pro

okay...thanks for your help... n_n

Ya once you feel your objective is served then close the thread, so that others can concentrate on other threads.
Read the forum rules on using the code tags.And you can also vote posts and persons positively and negatively all this is mentioned in the forum.Go through it and ya Welcome to DANIWEB !

csurfer 422 Posting Pro

You don't need to use the reference variables at all as char calculateGrade(int& avrg, char& grade) This is enough :

char calculateGrade(int avrg)
{
char grade;
//After this same function definition as you have done no changes...
}

And now comes the change part...With the above code you cannot use

calculateGrade(avrge,gd);
cout <<"Grade is : "<< gd<<endl;

To output your grade...
Firstly the function call would be calculateGrade(averge) This function returns a character which is your grade.

Here I leave you on your own, Try to find out where and how to modify in your main function to achieve your objective.

csurfer 422 Posting Pro

@sparksterz : No you should not use system("pause") to view the output.It has been discussed here a lot number of times. You can use cin.get() instead and it too will work in the same way.

@yuha : Not one there are several things wrong with this code.

1) Usage of <conio> which is already extinct.
2) Usage of std::cout std::string etc is required, or atleast usage of standard namespace as

#include<iostream>
using namespace std;
// Code continues...

is required.
3)Using int main and return 0 at the end instead of the void main().
4)Your calculateAverage function is flawed it doesnt calculate the average at all.

void calculateAverage(int& average)
{
int sum=0,score;
cout<< "Enter all of the test score: " << endl;
for (int i = 0; i <5; i++)
cin >> score;
cout << score;
sum = sum + score;
average = sum/5;
}

the above two statements are not included in the for loop at all and so you'll never get the average.It should be

void calculateAverage(int& average)
{
int sum=0,score;
cout<< "Enter all of the test score: " << endl;
for (int i = 0; i <5; i++)
{
cin >> score;
cout << score;
sum = sum + score;
}
average = sum/5;
}

5)Your grade function needs a lot of restructuring so that it outputs the right grade.

csurfer 422 Posting Pro

They have mentioned everything so clearly... Use if else or if else ladder to find the ranges in which the given temperature falls and print accordingly...

csurfer 422 Posting Pro

Why not?

For several obvious reasons Tom Gunn :

1)Because it is sub standard.
2)Uses all the extinct headers and commands.
3)It is not according to the c99 standards.
4)void main is valid in it.
5)The blue screen irritates a lot... ;)
And loads other stuff.........

csurfer 422 Posting Pro

Here are your Errors...

Err 1:
Line 67 :

scanf("%d", operation2);

It should be

scanf("%c", &operation2);

Err 2:
Your macros are completely useless in this case.Even though you can change them to correct the mistake I would suggest an alternate way.

scanf("%c", operation2);
				
/* uss a switch case structure to use the user input calculator math */
switch (operation2)
{
                case 'a': 
		case  'A': total = num1 + num2;
			operation = '+';
		break;

                case 's': 
		case 'S': total = num1 - num2;
			operation = '-';
		break;

                case 'm':
		case 'M': total = num1 * num2;
			operation = '*';
		break;

                case 'd':
		case 'D': total = num1 / num2;
			operation = '/';
		break;

               case 'q':
		case 'Q': 
			total = num1 % num2;
			operation = '%';
		break;

		default: printf("Invalid Letter selected\n");
}

Err 3:
What you are doing is mixing the concepts.Don't do it. Try to clarify your doubts and have a clear conceptual of MACROS and where they are used and where do we need to sue variables.And ya also try to have a look on why fflush(stdin) is bad and should be avoided.
You'll always find help in this community as long as you show some hard work from your side.

csurfer 422 Posting Pro

What Ancient Dragon has suggested is a wonderful suggestion try to implement it but it is completely inconsiderate with the problem in your code...

In your code :

for (int i = MAX - 1; i >= 0; i--)
        cout << output[i] << endl; //Compiling error
        if (i % 8 == 0)
            cout << "   " << endl;

This for loop is the one which is causing the error.Here even though

if (i % 8 == 0)
            cout << "   " << endl;

part should be inside the for loop according to indentation,it wont be considered inside the for loop and would be considered as this:

for (int i = MAX - 1; i >= 0; i--)
        cout << output[i] << endl; //Compiling error

 if (i % 8 == 0)
        cout << "   " << endl;

But when treated like this variable "i" is not at all declared in the function as the scope of "i" ends as soon as the for loop is over.

Therefore correct your code as this :

for (int i = MAX - 1; i >= 0; i--)
{
        cout << output[i] << endl; //Compiling error
        if (i % 8 == 0)
            cout << "   " << endl;
}

and it will work in the way you want it to work.

csurfer 422 Posting Pro

cin >> sa;

if (sa == NC)
NC = "North carolina";

else if (sa == SC)
SC = "South Carolina";

cout << "The State Abbreviation you entered stands for " << sa << endl;

Error lies here.You take sa as the input string and then you even match it improperly and finally you output sa only, that is what ever you have entered will be displayed at the output...

Try this:

cin >> sa;

if (sa == "NC")
sa = NC;

else if (sa == "SC")
sa = SC ;

cout << "The State Abbreviation you entered stands for " << sa << endl;
csurfer 422 Posting Pro

Ya I too feel this is TC that you are working on.So I would suggest this...

1) You can always play with the co-ordinates when working on TC, like usage of gotoxy( x , y ) To move to a particular part of the screen and then print the stuff you want by using settextcolor() (I am not sure if this is the command just type "textcolor" and put your cursor there and press Cntrl F1 you'll get help).

2) Another thing I would like to suggest here is usage of "viewport" concept here so that you can clear and modify only a part of the screen rather than redrawing the whole screen.

csurfer 422 Posting Pro

It must mean that quizMaster.isCorrectAnswer(answer) is always returning 0 .Just check in that particular function for solving the problem. Its quite straight forward right.

csurfer 422 Posting Pro

Apart from what Hiroshe has rightly stated,I would like to add these (after all corrections stated by Hiroshe):

1>

if (IsPrime(num)==(true));
{
printf("%d\n", num);
}

No semicolon at the end of if and don't do redundant work as in IsPrime(num)==(true) the following is enough:

if (IsPrime(num)) //No semicolon and a return of 1 is enough no need to recheck with "==" op.
{
printf("%d\n", num);
}

2>
And in your IsPrime function with this line :

for (i=3;i<=limit;i+=2)

You can still cut down the number of checks by checking only with the prime numbers <=limit as the rule says "If a number cannot be completely divided by any prime number <= its square root then that number is a prime".
Of course this doesn't matter much when the limit is 100 but for higher limits it counts a lot.

csurfer 422 Posting Pro

Use code tags specific to a language it would be better. :)

Few mistakes present:

1>
//Validate the input.

while (scores < 0)
{
cout << "Zero or negative numbers not accepted.\n";
cout << "Test Score #" << (count + 1) << ": ";
cin >>scores[count];
}

This should be:

//Validate the input.
while (scores[count] <= 0)
{
cout << "Zero or negative numbers not accepted.\n";
cout << "Test Score #" << (count + 1) << ": ";
cin >>scores[count];
}

2>

void showAverage(float, int);

change this to

void showAverage(float, int, float);

3>

showAverage( total, numScores );

//Get lowest

lowest = scores[0];
for ( int count = 1; count < numScores; count++)
{
if(scores[numScores] < lowest)
lowest = scores[numScores];
}

Change this to

//Get lowest

lowest = scores[0];
for ( int count = 1; count < numScores; count++)
{
if(scores[numScores] < lowest)
lowest = scores[numScores];
}

showAverage( total, numScores , lowest);

//Then go on with your deletion of allocated memory.

4>

void showAverage(float total, int numScores)
{
float average;

//Calculate the average
.
.
.
.
}

change this to

void showAverage(float total, int numScores ,float lowest)
{
float average;

//Calculate the average
.
.
.
.
}
csurfer 422 Posting Pro

Whats with return getchar() ? You got several other ways to pause the output.Use one of them rather than this because even though you return some random character as the return of main and exit the OS thinks that the process didn't terminate properly because of a non zero return value.Which of course doesn't cause any problem here but would definitely cause great problems in future when you write some important code.
So better correct it now.

csurfer 422 Posting Pro

Your question is completely dependent on the fact as to "How type safe is the language we are using?" Languages which assure complete type safety assure the release of memory at the end by the process of "Garbage Collection".
Even though C++ is a type safe language it entertains several features of C language just for the sake of backward compatibility and this is what prevents us from developing an effective Garbage Collector for C++ because an effective garbage collection is possible only in case of complete type safe languages and C++ doesn't reach the 100% mark.
It further depends on how your OS is as some take specific care about every memory allocated even if its in a type unsafe language.

So with all these things in mind its always better not to rely on the inbuilt Garbage collector provided by the language or by the OS and free the memory ourselves.

csurfer 422 Posting Pro

You mean to say Ten Point Three Eight is represented as 10,38 rather than 10.38 ???

Well if the answer to the above question is yes then of course you cant use the float data type for your work.So define your own data type something as follows:

class myfloat{
private:
string temp;
int bef_decpoint;
int aft_decpoint;
float value;
public:
//Some functions
};

Now what you can do is this:

1>Read in the string 10,38 up till "," into temp.

2>

//To get the integer value
istringstream out(temp);
out>>bef_decpoint;

3>Read in string 10,38 after the "," till '\0' (not including) into temp.

4>

//To get the numeric value of aft_decpoint
istringstream out(temp);
out>>aft_decpoint;
//To get the floating value
value=(float)bef_point+(float)aft_point / (10*temp.length());

5>Use it as you want now.

You didn't want to change the file so this is one of the "Brute force" ways to solve your problem.
Sky diploma has provided a far better way but with this approach you can use the "before ." and "after ." as separate entities in case you need it. :)

csurfer 422 Posting Pro

Why are you creating two threads for the same purpose....?
This thread is just the same...

And with regard to your question you can create a new file say headerfile.h with .h extension and place it in your working directory.Then by usage of #include "headerfile.h" above your main() source code in your cpp file and work.

csurfer 422 Posting Pro

That is right only one argument suffices when you are providing the position in the stream you want to access directly.

And the directions is for the seek call to count.
ios::beg with this the file pointer starts to calculate offset from the beginning of the file(i,e to say it starts counting the number mentioned as offset from the file start.)
and so on with the other flags.

I highlighted that as the mistake because with respect to g++ I think the flag field is needed.

csurfer 422 Posting Pro

Well string class is defined so that it stops on reading a space or newline so alternatively you can do this :

char s[20];
gets(s);
cout<<"\n"<<s;

This will read until it finds a \n' character and this will suffice your needs.

csurfer 422 Posting Pro

Major mistakes:

1>Using conio.h its an extinct header man.
2>Using clrscr() its also an extinct call.
3>Problem here is with :

printf("\n %d",temp);

You are printing the long int temp as a signed integer so after it crosses the limit of 32767 it goes on to the negative side.So use use it as:

printf("\n %ld",temp);
csurfer 422 Posting Pro

tempIn.seekg (tempOut.tellp ());

Problem with this line is due to seekg function. seekg and seekp calls take the position from which they need to start seeking as flags as: file_ptr.seekg(<offset>,flag); Offset is given by tempOut.tellp() but the flag should be one among :
ios::beg to start counting from beginning.
ios::cur to start counting from current file pointer position.
ios::end to start counting from the end of the file.

According to me here you need ios::beg flag so replace that statement with:

tempIn.seekg (tempOut.tellp (),ios::beg);
csurfer 422 Posting Pro

You can use strchr function with space as the delimiter to mark the boundary of the first token and then read it accordingly.

csurfer 422 Posting Pro

You should have posted this under the same thread buddy.Because we need to start from the scratch in understanding if you start a new thread.Topic under same thread will let us know that its a part of it only.

You still have a mistake left :

rss.open("studentScoreData.txt",ios::in,ios::binary);

Its not "," that you should use in between the flags.you should use "|" operator as below:

rss.open("studentScoreData.txt",ios::in|ios::binary);

Other things are running fine i suppose :).Enjoy.

csurfer 422 Posting Pro

Thanks a lot. that makes sense now that I look at it. correct me if I'm wrong here.

i%count == 0 endl... translates into:

if the remainder of i divided by the count is zero then skip a line. just trying to re-enforce what i've learned here.

Ya if remainder is zero then "skip the line" or "print the next number from next line" or "go to next line" which ever way you wanna say.By doing that you get out of trouble of dividing the numbers into groups(all the multiple of n issues) and will get a perfectly formatted output.

And ya once you are done mark the thread solved.If not satisfied you can continue posting in your queries.

one other thing to make sure I'm not gaffing this up. but I can loop the random numbers into an array to do other math functions later right?

Ya you can push those random numbers generated into an array for future use.But I don't see any sense in doing that because if you want random numbers in future then you would generate them then and there itself,no need to pre compute them and store them.However if you want to do so and your code needs it you can do so.

csurfer 422 Posting Pro
int main()
{
double randValue;
int a,b,i, n, entry, y, count;
char again = 'y';

while (again == 'y')
{
  cout<<"Please enter the number of random numbers you want(1-100):"<<endl;
  cin>>n;
  cout<<endl;


  if (n <= 100)
  {
     srand(time(NULL));  // this generates the first "seed" value
     cout << "Please enter the range you want (lowest to highest) : " <<endl;
     cin >> a;
     cin >> b;
     cout<< "Please enter the number of elements you want in a group "<<endl;
     int cnt;
     cin >> cnt;

  if(a<b)
  {
     for (i = 1; i <= n; i++)
     {
         randValue = a + rand() % (b+1-a);
         cout << randValue << "  ";
         if(i%cnt==0) cout<<endl;
     }
     return 0;
  }
  else
  {
    cout << "Enter the range from lowest to highest only!" <<endl;
    cout << "Do you wan to continue? y or n?" <<endl;
    cin >> again;
  }
}

else
{
     cout << "Enter a value between 1-250 only!" << endl;
     cout << "Do you want to continue? y or n??" << endl;
     cin >> again;
}
}
}

The additions made in red are the only things you need to change to get your desired output.

csurfer 422 Posting Pro

@zeus1216gw:

No need to flame up ok.Read your post (#5) k.It reads as below :

sorry I forgot to add the groups need to be on the same line separated by a blank line. would it be sometime similar? I keep getting errors. thanks

I called the phrase idiotic not you.And we before helping have every right to ask you to show your effort(Sometimes the codes).And that was asked to help you out.So keep your calm and read what people have posted and what you have posted before flaming !!!

csurfer 422 Posting Pro

sorry I forgot to add the groups need to be on the same line separated by a blank line

That's idiotic I think you want to say blank space.
Hey you really cant expect us to give every detail.You need to work yourself.If you need the groups to be on separate lines you used to insert a "\n" or an endl in cout now when you want them to be separated by a space for the same code insert " " (space) rather than "\n".

Thats what Tom Gun said,you have your code right post it in.

csurfer 422 Posting Pro

Ya you can do that or device your own method to convert it into an integer.