Search Results

Showing results 1 to 40 of 92
Search took 0.02 seconds.
Search: Posts Made By: Murtan ; Forum: C and child forums
Forum: C 2 Days Ago
Replies: 5
Views: 155
Posted By Murtan
Show me some code.

I want to see your database access and at least one attempt at making a copy of the data.
Forum: C 2 Days Ago
Replies: 1
Views: 124
Posted By Murtan
Show us what you've done...

http://www.daniweb.com/forums/announcement118-2.html
Forum: C 2 Days Ago
Replies: 5
Views: 155
Posted By Murtan
Ok it would seem your design is at least a reasonable choice then.

Will you have any trouble with the 'make a copy of the data' part?
Forum: C 2 Days Ago
Replies: 4
Views: 157
Posted By Murtan
Well, I personally prefer to help with code that will at least compile...

Your original lines 36-39:

status = fscanf(filep, "%d%d%d%d", measuredp->site_id_num
measuredp->wind_speed...
Forum: C 2 Days Ago
Replies: 5
Views: 155
Posted By Murtan
I'm almost certain you have to make a copy of the data to do what you're trying to do.

Depending on the database and the size thereof, attempting to load the entire database into an array might...
Forum: C 13 Days Ago
Replies: 1
Views: 218
Posted By Murtan
When asking for help, please describe the symptoms you do see (if any).

For debugging purposes, you should add some print statements to your code to confirm that you are getting the data you...
Forum: C 14 Days Ago
Replies: 2
Views: 286
Posted By Murtan
Posting the code (in code tags) would have saved a lot of description of 'how you solved' the problem and given us a chance to actually help you.

I think I understand the symptoms of the problem...
Forum: C Sep 30th, 2009
Replies: 3
Views: 387
Posted By Murtan
If the parent process doesn't have to wait, why does it care who finishes first.

If at least one child process needs to finish, then you have to wait.
Forum: C Sep 29th, 2009
Replies: 5
Views: 698
Posted By Murtan
That looks like it ought to work.

The program is counting the characters in the word say "daniweb" and also counting the enter as it is also a character before the EOF.

if you entered "daniweb"...
Forum: C Sep 29th, 2009
Replies: 5
Views: 698
Posted By Murtan
We like to help those that show some effort, especially when it appears to be an assignment.

Show us what you've tried. Tell us what it does and what you expected it to do and we can help you make...
Forum: C Apr 21st, 2009
Replies: 6
Views: 794
Posted By Murtan
Not surprisingly, but your program is doing what you told it to:


// Wait here for the user to enter a message
gets (msg);

while (msg != "q")
{
/* Write out message. */
...
Forum: C Mar 2nd, 2009
Replies: 6
Views: 461
Posted By Murtan
No the problem is with python...you can't run python code without having python installed (or using the large python dll that has all of the python stuff in it.) The python code expects that all to...
Forum: C Jan 28th, 2009
Replies: 5
Views: 549
Posted By Murtan
I'm sorry, did you bother to read my post at all?


/* TAking input from user and storing it in ArrTemp array */

fgets(ArrTemp, ARR_TEMP_SIZE, stdin);

for(iLength=0; iLength<ARR_TEMP_SIZE;...
Forum: C Jan 28th, 2009
Replies: 5
Views: 549
Posted By Murtan
problems in fnAddDepartment():


fgets(ArrTemp, ARR_TEMP_SIZE, stdin);
for(iLength=0; iLength<ARR_TEMP_SIZE; iLength++)
{
ArrTemp[iLength]=Dept_Name[iLength];
}

The...
Forum: C Jan 25th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
I thought of a way to write your program without using the '||' operator would be to double the ifs and have 2 sections for each.


if (m == 3 && d >= 21)
printf("\nYour star is ARIES");
if...
Forum: C Jan 25th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
Actually, that code tag message was intended as a reply for yabuki

But if you're not posting your code with code tags, feel free to use them :)
Forum: C Jan 25th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
I don't think I can be much more blatant.

When you type:

int main() {
printf("Hello, World\n");
return 0;
}
Forum: C Jan 25th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
That's very pretty code, but it should have been posted using code tags.

When posting c code, please use c code tags

/* Your code here */


And logically, the if statements you have don't...
Forum: C Jan 24th, 2009
Replies: 13
Views: 658
Posted By Murtan
I wasn't in your original chain...but I'll try to help.

(I ended up compiling and running your code in the debugger)

Your problem is that you have a pointer to a pointer and you're indexing off...
Forum: C Jan 24th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
AND and OR are 2 similar but different constructs.

month = 3 && month == 4
Is an impossibility, it will NEVER happen

month == 3 || month == 4
happens for months 3 and 4
Forum: C Jan 24th, 2009
Replies: 7
Views: 909
Posted By Murtan
We're having a communication problem.

We are recommending that you create in memory a copy of what you want the file to contain. You are being specifically advised against trying to 'edit' the...
Forum: C Jan 24th, 2009
Replies: 16
Solved: MISTAKE
Views: 703
Posted By Murtan
Rephrasing one of your if statements into english:

if (d>=21 && d<=19 && m==3 && m==4)

That reads: If the day of the month is both more than or equal to 21 and also less than or equal to 19...
Forum: C Jan 24th, 2009
Replies: 7
Views: 910
Posted By Murtan
I don't think you can use scanf and meet those criteria, scanf will not accept spaces.

I suggest using fgets and parsing the line you get back to validate.
Forum: C Jan 24th, 2009
Replies: 8
Views: 1,162
Posted By Murtan
How would you solve the problem manually?

I want to withdraw $180, what bills would you give me?

How did you decide how many to give me?

Ok now make the computer do it...

Write some code...
Forum: C Jan 23rd, 2009
Replies: 5
Views: 822
Posted By Murtan
Putting code in headers is generally bad form....if you include that same header in more than one file in a compilation unit you get duplicate symbols.

The original layout of the files should have...
Forum: C Jan 22nd, 2009
Replies: 9
Views: 461
Posted By Murtan
(*rats I wasn't first reply :( *)

int i,j surname[N],name[N],ID[N],grade[M][N];
Declares all of those variables as integer. Should some of them have character data?

The format in...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
I agree that Vortex * Vortex is the maximum number you could have, but you know how many you had, why not use that number instead of looping beyond what really makes any sense.

Is there another...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
You are obviously searching the input array, but you are iterating Vortex * Vortex times. Isn't that more than the array can hold? (or is there another counter for the number of input pairs?)

Your...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
Thanks for the better explanation.

Is it possible that you might have an input line like:

F M 24


If so, your current data structure is insufficient to hold your data as the '24' will not...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
First comment...the single character input[0][x] can never be the invalid character constant '10'.

You still haven't stated in english what you're trying to accomplish. Whatever the "Y" is in "Do...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
That was a nice paragraph, but I still have no idea what you wanted to do with the data from Input[2].

"deduce the '8' from a counter variable"?

Why don't you write (in english) what you need...
Forum: C Jan 22nd, 2009
Replies: 13
Views: 601
Posted By Murtan
Comment on your first code segment: I would have been tempted to use fgets() but your code should work.

Second and Third code segment: The following will always subtract 65 (which is the ASCII...
Forum: C Jan 22nd, 2009
Replies: 11
Views: 766
Posted By Murtan
What about the rest of the post?

Why can't you convert from a string to a number, add one and convert it back?

And if an employee didn't have a mobile, I'd leave the field blank, not fill it...
Forum: C Jan 22nd, 2009
Replies: 11
Views: 766
Posted By Murtan
Please don't answer each post since your last with the same string, we all have to read through all of them.

I can't imagine any phone system where you can pre-order sequential 7 digit phone...
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
I built and compiled your code.

I added one debug line:

for(row=0;row<MAXSTUDENTS;row++){

printf("\nEnter First name : ");
scanf("%s",name);

for(col=0;col<EXAMS;col++){
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
First, this isn't your thread. You aren't supposed to SOLVE the problem for them, THEY are supposed to do most of the work. We only want to help them through the code they don't understand.

The...
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
Define successfully.
How many grades did it print out?
Were there 15 grades?
Did you attempt to add additional printf's to confirm that the grade array actually got any data in it?
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
name was declared as char name[20]; which is enough space for ONE 20 character name and '%s' is DESIGNED to work with character arrays.

grade was declared as int grade[MAXSTUDENTS][EXAMS] which is...
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
Yes, grade is now a two dimensional array.

Do you always want to put the score in grade[0][0]?
Forum: C Jan 21st, 2009
Replies: 20
Views: 1,209
Posted By Murtan
for(col=0;col<EXAMS;col++){
printf("\nExam score : ");
scanf("%d",&grade);


That was from your code.
Showing results 1 to 40 of 92

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC