Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
6
Posts with Upvotes
6
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
0 Endorsements
Ranked #1K
~13.2K People Reached
Favorite Tags

31 Posted Topics

Member Avatar for myk45

Actually, you're not quite there with the sum yet. Try the array {-2, 1, -3, 4, -1, 2, 1, -5, 4}. The correct sum is 6 (4 + -1 + 2 + 1), but your code gives 4.

Member Avatar for VIKAS REDDY
0
725
Member Avatar for happygeek

I think you ought to declare your interest: [URL="http://www.pcpro.co.uk/forum/viewtopic.php?t=346675&sid=c98cb9a0974350dc3698a03ac00bac91"] SafeSync - PC Pro not-so-special offer will cost you double[/URL]

Member Avatar for PeterM88
0
650
Member Avatar for cuckas
Member Avatar for onus
Member Avatar for yuri1969
Member Avatar for Martin B
0
2K
Member Avatar for civirol02

I think you should start by using scanf to read in the number of rows and columns into two variables. Post this when you've written it.

Member Avatar for Adak
0
140
Member Avatar for JDevelop

Since you don't know in advance how many words there are, and how long they will be, you need to use dynamic memory allocation: 1. malloc 2. realloc 3. free There is no readline function in standard C. There is an fgets function that reads a line of text. You …

Member Avatar for JDevelop
0
324
Member Avatar for comsians

I'm sure I've said something like this before today, but I suggest you start by reading the date of birth into three integer variables, perhaps using scanf. Let us know how you get on.

Member Avatar for comsians
0
365
Member Avatar for myk45

The pointer is advanced [I]after[/I] the fgetc, so when you look at it, it is always one character ahead of what you have just read. After you have read the last character, it is pointing to garbage.

Member Avatar for myk45
0
212
Member Avatar for CleanSanchez
Member Avatar for CleanSanchez
0
150
Member Avatar for ktsangop
Member Avatar for USC_Megoy

From the function names you've given, I think you were looking at this question: [URL="http://www.daniweb.com/forums/post1032112.html#post1032112"]Cursor Base implementation of list problem [/URL] A cursor linked list is a data structure consisting of a linked list embedded in an array. I think the term was coined by Mark A. Weiss in his …

Member Avatar for Martin B
0
130
Member Avatar for gahhon

I can't see anything wrong with those two functions (well, nothing [i]logically[/i] wrong anyway). You'll need to provide some more context. How is the student list getting populated and how are these functions being called?

Member Avatar for N1GHTS
0
214
Member Avatar for DrueY

The input is just a file containing one floating point number on each line. The output is the DFT of each value, normalised by the length of the input, i.e., the value calculated for each individual input will be different depending on the total number of inputs.

Member Avatar for DrueY
0
99
Member Avatar for Rahul.menon

[code=c]for(i =1;i<=4;i++,printf("\n"))[/code] Do you [i]really[/i] want that printf there?

Member Avatar for Rahul.menon
0
105
Member Avatar for quietcity2012
Member Avatar for upendrap

So what is your problem? 1. Reading files 2. Converting filenames You'll need to be more specific.

Member Avatar for Martin B
0
80
Member Avatar for Bozog

You don't actually need to read in lines to count the paragraphs. You can read using fread and look for double CR/LFs. Note that you'll need to look for 0x0D and 0x0A, because '\n' won't work correctly with fread on Windows.

Member Avatar for Martin B
0
1K
Member Avatar for brendono978

I don't think you should sort. Use two arrays. Read the numbers into the first array, and then scan it N times, looking for numbers to add to the second array: [code=c] unsigned int n; for (n = 1; n <= N; n++) { } [/code] In each scan you …

Member Avatar for brendono978
0
184
Member Avatar for Knome

You want: [code=c](*randomcur)->value = generateRandom(j,d);[/code] because [code=c]*randomcur->value = generateRandom(j,d);[/code] is the same as [code=c]*(randomcur->value) = generateRandom(j,d);[/code]

Member Avatar for Martin B
0
4K
Member Avatar for Perry31

There isn't a built in way of doing this. You would need to write a parser. 1. Read each line of the file into a buffer using fgets (assuming you know the maximum line length). 2. Walk through the string until you come to the next separator, and copy what …

Member Avatar for Martin B
0
127
Member Avatar for paresh5221

[URL="http://sourceforge.net/projects/phpexcelreader/files/Spreadsheet_Excel_Reader/"]PHP-ExcelReader[/URL] You would have got a faster response in a PHP forum.

Member Avatar for Martin B
0
86
Member Avatar for Ogakor

I should add that you could also consider sorting a linked list by turning it into a binary tree and then back into a list again. [URL="http://www.martinbroadhurst.com/articles/sorting-a-linked-list-by-turning-it-into-a-binary-tree.html"]Sorting a linked list by turning it into a binary tree [/URL]

Member Avatar for Martin B
0
198
Member Avatar for zhuangdeyouxian

From your description of the problem you don't need to [I]change [/I]append, you need to [I]not use [/I]append. In the places where you would append a node to list3, you want to just print its value instead.

Member Avatar for Martin B
0
125
Member Avatar for devesh2222

[code=c] #include <stdlib.h> int main(void) { system("program1"); system("program2"); return 0; } [/code]

Member Avatar for myk45
0
83
Member Avatar for devesh2222

If you're using gcc, you can use objdump to examine object code files. If you use Visual C++, you can use dumpbin.

Member Avatar for Martin B
0
98
Member Avatar for livesinabox

You're off by 1. When you push the first element, it's at stck[1], because you increment top first. You are reading the values back from stck[2] to stck[0] (which is uninitialised), instead of stck[3] to stck[1].

Member Avatar for livesinabox
0
147
Member Avatar for onus
Member Avatar for starkz_123

This is quite straightforward. Your only problem is that Java doesn't have pointers, so you need another way of passing the values to be converted by reference. What you need to do is to put the arguments to the [I]convert[/I] function into a class: [code=java] class convertArgs { public int …

Member Avatar for digital29
-1
226
Member Avatar for caraie

The problem is in line 15. You are filling the matrix as if it is an a * a matrix, but it is an a * b matrix.

Member Avatar for Martin B
0
122
Member Avatar for girlzone

I'm going to answer this thread, even though it is rather old, because it comes very high in the Google search results for "circular linked list", and there hasn't been a comprehensive answer. Firstly, it isn't pertinent to compare a circular list to a singly- or doubly-linked list individually; circular …

Member Avatar for Martin B
0
558

The End.