519 Posted Topics
Re: Do you want to find the difference between 2 files ? | |
Re: Check out [URL="http://www.cplusplus.com/doc/tutorial/files/"]this[/URL] page | |
Re: Conceptually sorting an array of strings is no different from sorting an array of integers. There is one main difference. When we are comparing 2 integers, say a and b, it is quite easy to say a is greater than / lesser than / equal to b. If you are … | |
Re: Check out [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/atof/"]atof[/URL] | |
Re: Also if you declare an array like [CODE]int arr[10] [/CODE] The last legal index into the array is 9. Anything beyond this and your code will crash. | |
Re: Read [URL="http://www.cprogramming.com/tutorial/function-pointers.html"]this[/URL] | |
Re: Run this program. This should clear your confusion [CODE] #include<stdlib.h> typedef struct Person { char fname[100]; }FOO,*FOO1; int main() { FOO f1; FOO1 f2; printf("%d %d\n",sizeof(f1),sizeof(f2)); return 0; }[/CODE] | |
Re: Did you try the suggestion given by @Moschops | |
Re: Where is the code breaking ? Put some log statements to get a better idea of the behavior of your program | |
Re: [QUOTE=Arbus;1548986]In your code the declaration of the pointer account_array is fine. [CODE]char (account_array[size];[/CODE] [/QUOTE] I guess you meant [CODE]char *account_array[size];[/CODE] | |
Re: Can you give the Input which is breaking the code ? Also put some log statements to print the number of points that the dealer and the player has | |
Re: In my experience Let us C is one of the best books for the C programming language. Try finishing the book completely. As for your question the functions you mentioned are provided in string.h ... Depending on the compiler that you are using you may or may not have it. | |
Re: Check out [URL="http://www.difranco.net/cop2220/op-prec.htm"]this[/URL] link. It contains the operator precedence for all the operators in C If you look at this link carefully and then look at the sequence of operations in the statement *(list)-> head you will realize your mistake | |
Re: This is just a hunch but try including fstream.h instead of frstream Also can you make a sample code to just read data from a file as most of your errors seems related to file handling options | |
Re: Can you please explain what you are trying to achieve in the if block lines 44 - 59 | |
Re: Can you put some log statements so that we can see the flow of control when you try to fetch a page from Daniweb ... Paste the log output on the forum | |
Re: How are you compiling the program ? There has to be a .exe file ... | |
Re: To print a file you would need to interact with device drivers of the printer ... I dont know if that is easily achievable by using standard c programing | |
Re: I have some observations about the pop function.... May or may not apply to you Say you have 1,2,3,4,5 in the stack with the 5 being at the top. If I wanted to do a pop operation I would: 1. Copy the variable 5 in a temp variable. (Check for … | |
Re: Try using the exact code written by AD [CODE]Form1::Form1^ form1 =gcnew Form1::Form1; form1->textBox1->Text="Hello!";[/CODE] | |
Hello Everybody, I was recently looking some code ... The person who wrote the code was using the ping command to send some data to the google.com and then he recovered some statistics from mdev ... [URL="http://www.daniweb.com/software-development/cpp/threads/360576/1542507#post1542507"]This[/URL] link contains the source code I am referring to ... My question is … | |
Re: Check out [URL="http://www.gamedev.net/page/resources/_/reference/programming/sweet-snippets/simple-file-io-using-c-r1127"]this[/URL] link | |
Re: What is the purpose of this line ? [CODE]&*a= &(*fot);[/CODE] The code fragment that you have posted does not contain any loops or recursion . Please put some cout statements to get a better idea of the region where the code is freezing | |
Re: Quick question do you know the relevance of the keyword extern ? I removed extern and the program compiled with just 1 warning | |
Re: Don't use the ping command. Create a socket to a remote server. Write some data to the socket.Check how much time it takes for the server to respond. The time difference can be your seed | |
Hello Everybody, I am on a Ubuntu system and I just came across /dev/random I tried searching for examples of how to use this utility (or file/ or command) to generate a random number but I cannot find anything. Quick note I am trying to generate a random number on … | |
Re: Also how about clearing the content in the namelist array before using the add function [CODE] for(int i=0;i<size;i++) { for(int j=0;j<namelist[i].length;j++) namelist[i][j] = '\0'; }[/CODE] Maybe overkill but wont hurt | |
Re: Is your binary to decimal conversion correct ? For decimal to hexa decimal use the approach mentioned [URL="http://www.wikihow.com/Convert-from-Decimal-to-Hexadecimal"]here[/URL] | |
Re: An uninitialized global variable takes the value 0. Doing a 0/0 division will give you an Arithmetic exception. I think this should solve the crashing issue. How did you compile the program ? I also got the same compilation errors that mitrmkar got | |
Re: Check out [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/system/"]this[/URL] link Also will your program be required to run on a non windows machine ? | |
Re: In the function to calculate the median you have used the variable i without initializing it. | |
Re: One way is to check the ASCII value of each character. The space character, / character all have distinct values | |
Re: Vector is a C collection class . Do you really require the names of your functions to be vector and free_vector ? | |
| |
Re: Check out [URL="http://www.cplusplus.com/doc/tutorial/files/"]this[/URL] link | |
Re: What is the issue with your program ? What is the expected output and what are you getting ? | |
Re: I dont know if this is of any consequence or not but why do you have %*c in your fscanf ? | |
Re: Check out [URL="http://www.cplusplus.com/forum/beginner/8388/"]this[/URL] example | |
Re: I think Dev C++ is usually for C++ not C thought I am not sure Please correct me if I am wrong | |
Re: 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 … | |
Re: Can you put the print for loop just after you read the content from the file. Post the output here | |
Re: 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 ? | |
Re: 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 [CODE] int main(); { int x =10; int *p = &x; printf("%d\n",*p); // This gives 10 printf("%u\n",p); // This gives … | |
Re: 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 | |
Re: Read the input file into a char array. Search through the char array for 2 consecutive \n\n ... | |
Re: Please [URL="http://en.wikipedia.org/wiki/Indent_style"]indent[/URL] your code properly . | |
Re: Can you print the value of argv[1] ? Also can you get rid of line 27 completely ? | |
Re: Also what are the names of the header and the implementation files ? | |
Re: What issues are you getting ? "I am getting some issues" is not really helpful |
The End.