Have you allocated memory for you pointer ?
What is the exact error ?
Have you allocated memory for you pointer ?
What is the exact error ?
I dont know if this is of any consequence or not but why do you have %*c in your fscanf ?
Is your binary to decimal conversion correct ?
For decimal to hexa decimal use the approach mentioned here
Can you put the print for loop just after you read the content from the file. Post the output here
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
@Walt
Yes this could be another way to do it
Read the input file into a char array.
Search through the char array for 2 consecutive \n\n ...
I think Dev C++ is usually for C++ not C thought I am not sure
Please correct me if I am wrong
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;
}
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 ?
The very first if condition if(argc > 1) is failing.
Please post the exact commands used for compiling an running the code
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
You have 2 statements under the if condition but there is no bracket to enclose the 2 statements. Is this what you want ?
After inputting the data, should you not create a separate for loop from 0.. 360 for that increment stuff ?
What is the issue ?
Also what are the names of the header and the implementation files ?
What do you mean by "put all 3 into one" ?
Can you print the value of argv[1] ?
Also can you get rid of line 27 completely ?
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 ?
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 ?
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
What issues are you getting ?
"I am getting some issues" is not really helpful
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
Also I notice that the loc variable used in while loop in the quick sort is not initialized.
Can you please explain your problem more concisely ....
@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?
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 ?
@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
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 ?
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
@rubberman
Thanks for the correction
What is the if statement supposed to do ?
What is the error that you are getting ? Did you try to debug ?
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
Do a google search for pascals triangle c . You will get lots of examples
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
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
Further clarifying gerard's post uint16_t is a data type ..Kind of like int / char ...
Put a printf before that statement
Can you please give an example of the expected Output and the output that you are getting ?
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
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
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
There is a functional called itoa which can convert int into strings
Cool .... Hoping to see that soon.
My 600 post ye :)
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 ?
What is the input that you are giving to the client and the server programs
Quick question AD, which hardware does groups 4 bits into a byte ?