abhimanipal 91 Master Poster

Have you allocated memory for you pointer ?

What is the exact error ?

abhimanipal 91 Master Poster

Check out this example

abhimanipal 91 Master Poster

I dont know if this is of any consequence or not but why do you have %*c in your fscanf ?

abhimanipal 91 Master Poster

Is your binary to decimal conversion correct ?

For decimal to hexa decimal use the approach mentioned here

abhimanipal 91 Master Poster

Can you put the print for loop just after you read the content from the file. Post the output here

abhimanipal 91 Master Poster

Hi Chester I have a vague idea of what your question is , but before I dispense any advise can you please clarify your question ?

PS: Some random thoughts which may or may not help you
1. If you have an array of structs, there is no way to set arr[index] = null. What you can do is add a member to the struct definition called as isValid. Later if you want to set arr[index] = null, you can instead set arr[index].isValid = 0. In your print functions you can ignore all arr[index] where isValid is set to 1

2. If you have 2 struct variables t1 and t2 then if you write t1 = t2 , all of t1's contents will be replaced by t2 contents

Hope this helps

abhimanipal 91 Master Poster

@Walt
Yes this could be another way to do it

abhimanipal 91 Master Poster

Read the input file into a char array.
Search through the char array for 2 consecutive \n\n ...

abhimanipal 91 Master Poster

I think Dev C++ is usually for C++ not C thought I am not sure

Please correct me if I am wrong

abhimanipal 91 Master Poster

Please indent your code properly .

abhimanipal 91 Master Poster

When you say double *max, the variable max contains the address. To print the value you have to write *max .

PS I hope you have malloced memory for max

int main();
{
    int x =10;
    int *p = &x;

   printf("%d\n",*p);           // This gives 10
   printf("%u\n",p);            // This gives an address

   return 0;
}
abhimanipal 91 Master Poster

Currently what you are doing is comparing to see if agent[n] == agent[m] and if so you are doing some computation and storing the results at th n the position of the amount / sales / value arrays.

But when you are printing the values of the amount / sales / value arrays do you print the values at the m th location as well ?

abhimanipal 91 Master Poster

The very first if condition if(argc > 1) is failing.

Please post the exact commands used for compiling an running the code

abhimanipal 91 Master Poster

Do you understand the concept of "array of structures " ?\

I think when you prof said "combine all 3 into one" he meant you to use 1 array of structs as opposed to to 3 separate arrays. This is my interpretation, please clarify

abhimanipal 91 Master Poster

You have 2 statements under the if condition but there is no bracket to enclose the 2 statements. Is this what you want ?

abhimanipal 91 Master Poster

After inputting the data, should you not create a separate for loop from 0.. 360 for that increment stuff ?

abhimanipal 91 Master Poster

What is the issue ?

abhimanipal 91 Master Poster

Also what are the names of the header and the implementation files ?

abhimanipal 91 Master Poster

What do you mean by "put all 3 into one" ?

abhimanipal 91 Master Poster

Can you print the value of argv[1] ?

Also can you get rid of line 27 completely ?

abhimanipal 91 Master Poster

Dont get intimidated by the size of the problem statement ...

Lets start with the first part of the problem statement ...

What is the very first problem that you are facing and how do you think it should be solved ?

abhimanipal 91 Master Poster

1. Where is dwWaitResult defined ?
2. You can use only integral constants as case expressions in a switch statement. Where is stuff like WAIT_ABANDONED defined ?
3. On line 137 you have func(a,b,c) = x .... Is this what you want ?

abhimanipal 91 Master Poster

1. Write a loop to go through the entire file and populate the arrays.
2. After the loop in step 1 finishes then write the sorting function.

What you have done now is that you have combined step 1 and step 2

abhimanipal 91 Master Poster

What issues are you getting ?

"I am getting some issues" is not really helpful

abhimanipal 91 Master Poster

To understand how radix sot works check out simulator it has a very good explanation . If you try searching for " radix sort code " you might get lots of programming resources as well

abhimanipal 91 Master Poster

Also I notice that the loc variable used in while loop in the quick sort is not initialized.

abhimanipal 91 Master Poster

Can you please explain your problem more concisely ....

abhimanipal 91 Master Poster

@Walt

Quick question, the condition in the while loop will use arithmetic and relational operators right ? Or is there any way to write the while loop condition?

abhimanipal 91 Master Poster

I see that this thread has been marked as solved but I had a quick question for the OP.

Did you handle the case when the Directory contained sub directories as well ?

abhimanipal 91 Master Poster

@L7Sqr
the pattern is that you alternatively add 1 , then add 2 and so on ...

@OP
Please provide more info about the problem statement and post your coding efforts

abhimanipal 91 Master Poster

Is the if statement working correctly ?

Print the results that you get after using the find . Also I see that you have a single = sign in the if block . Is this what you want ?

abhimanipal 91 Master Poster

This should help you get started

for each suite i: 1...4
for each card j:1 ... 13
// Now set the properties for the card

abhimanipal 91 Master Poster

@rubberman

Thanks for the correction

abhimanipal 91 Master Poster

What is the if statement supposed to do ?

abhimanipal 91 Master Poster

What is the error that you are getting ? Did you try to debug ?

abhimanipal 91 Master Poster

Are you sure your message is going correctly ?

If yes then sending a file should not be difficult .
Step 1 read the file into memory and the send the memory contents the same way you sent the message . Don't take the file name from the client as of now. Just send the contents of a file whose location you are sure of

abhimanipal 91 Master Poster

Do a google search for pascals triangle c . You will get lots of examples

abhimanipal 91 Master Poster

Hi I am sorry for all the back and forth . But can you please clearly state what is the output that you want ? And what is the current output that you are getting . Please be as descriptive as possible

abhimanipal 91 Master Poster

What if the digits at the 0 th place for both the numbers is 9 . Can you run through the code and see how it will perform

abhimanipal 91 Master Poster

Further clarifying gerard's post uint16_t is a data type ..Kind of like int / char ...

abhimanipal 91 Master Poster

Put a printf before that statement

abhimanipal 91 Master Poster

Can you please give an example of the expected Output and the output that you are getting ?

abhimanipal 91 Master Poster

1. Take the input from the user into a string called input
2. Use string length to go to the end of the string.
3a. Start iterating towards the start of the string. When you hit the space char, then stop. Store the chars that you iterated over into a temp string.
b. Reverse the temp string and then store the output in the output string
4. Repeat step 3 till you cover the entire input string

abhimanipal 91 Master Poster

Quick question, What is the data that you are trying to store in the stack ? 1's or the content b/w the < .... > tags ?

If you going to store just 1's then your program will break for

<html>
  <a>
       My text
  </b>
</xml>

Storing the content b/w the < .., > tags will require you to modify your data structure

abhimanipal 91 Master Poster

What is your question ?

By the way from the code you have posted I suggest you look at a tutorial on the concept of arrays

abhimanipal 91 Master Poster

There is a functional called itoa which can convert int into strings

abhimanipal 91 Master Poster

Cool .... Hoping to see that soon.

My 600 post ye :)

jonsca commented: Good to see you around +0
abhimanipal 91 Master Poster

Hi All,

First of all let me start by saying I love Daniweb and I try to take time out everyday to answer the questions that are posted in the various forums. But I am often on the move which means I have to follow the chains of messages in on my iPhone. It would be very nice, if the display of the daniweb web site could be optimized for viewing on an iPhone. An iPhone app would be even more nicer .Is there any chance of this happening in the near future ?

abhimanipal 91 Master Poster

What is the input that you are giving to the client and the server programs

abhimanipal 91 Master Poster

Quick question AD, which hardware does groups 4 bits into a byte ?