Forum: C 33 Days Ago |
| Replies: 9 Views: 240 Don't listen to dkalite. getch() is not standard, getchar() is.
As for your problem, my crystal ball tells me your problem is on line 75 of your code... :icon_confused: |
Forum: C 33 Days Ago |
| Replies: 6 Views: 9,055 Maybe if you USE CODE TAGS and Format your Code (http://www.gidnetwork.com/b-38.html) we might be able to help you. But your code is unreadable without formatting. |
Forum: C 33 Days Ago |
| Replies: 11 Views: 474 And in C for(unsigned i = 0; i < cantidad_frases; i++) is illegal.
i must be defined before it is used, not in the for statement. |
Forum: C 33 Days Ago |
| Replies: 9 Views: 318 Try this... (http://lmgtfy.com/?q=C+input+output) |
Forum: C 33 Days Ago |
| Replies: 3 Views: 199 Also you are not writing C++ code so all your variable definitions need to be at the top of your functions, before any executable statements.
And for us to follow your code, use proper formatting... |
Forum: C Oct 20th, 2009 |
| Replies: 2 Views: 374 Why didn't you use CODE TAGs? Information is posted all over this site about CODE tags, like
1) in the Rules (http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies) you were asked to... |
Forum: C Oct 20th, 2009 |
| Replies: 10 Views: 447 Nothing.
But return (0); or return 0; will exit the program and return 0 to the operating system. |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 271 Set a value to 0.
Then when you read a number, subtract 0x30 from it which converts it to a binary digit.
Now multiply value by 10 and add the digit. |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 408 As requested, Gaiety:
Way too complex for a new programmer...
Not true. What is true is ANDing with a float's maintissa or exponent and getting a useful result is difficult to impossible,... |
Forum: C Oct 20th, 2009 |
| Replies: 2 Views: 331 1) Using a useless BOLD for your question
2) Not using CODE tags
3) Not explaining what your problem is
4) Not telling us about where in your code the problem is |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 271 Put the digits into a char string. When you get a non-number. convert the digits using a function such as atoi(). Copy the operator to another variable. |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 408 0x8000000000000000 is the 'sign bit' of a 64 bit value. AND it with the value you want to check. If TRUE, the sign bit is set. |
Forum: C Oct 20th, 2009 |
| Replies: 1 Views: 208 I usually have to do some work to get something I need. You have to, also. |
Forum: C Oct 20th, 2009 |
| Replies: 10 Views: 447 :icon_rolleyes: What a bunch of useless responses :icon_rolleyes:
except for Tom's...
Why you don't use void with main(): click here (http://www.gidnetwork.com/b-66.html) |
Forum: C Oct 20th, 2009 |
| Replies: 4 Views: 325 Then read the Rules and the sticky post with titles that sound important. Easily fixed.
Here's why you should not use getch(): click here (http://www.gidnetwork.com/b-43.html).
Here's why your... |
Forum: C Oct 19th, 2009 |
| Replies: 12 Views: 468 Assuming this was a job interview, I suggest you stay away from any job that asks foolish questions like this. I would not want to work for a company that want it's programmers to use tricks that... |
Forum: C Oct 18th, 2009 |
| Replies: 2 Views: 440 Did your code work? If not, what happened? What value did you input? What value was output? How can you tell it didn't work? |
Forum: C Oct 15th, 2009 |
| Replies: 2 Views: 256 You already have a thread started. You don't need to start many threads on the same topic.
And you neglected to read any of the requested information posted all over this site about CODE tags,... |
Forum: C Oct 15th, 2009 |
| Replies: 4 Views: 325 Let's see...
No CODE tags, even thought there are at least 6 places they are explained, and 3 of them on the main page alone.
No explanation about why code was posted
I guess all there is to say... |
Forum: C Oct 15th, 2009 |
| Replies: 3 Views: 369 Let's see...
No CODE tags, even thought there are at least 6 places they are explained, and 3 of them on the main page alone.
No explanation about why code was posted
I guess all there is to say... |
Forum: C Oct 15th, 2009 |
| Replies: 3 Views: 372 We're glad you wrote the program and it works. Very proud of you. |
Forum: C Oct 14th, 2009 |
| Replies: 4 Views: 287 Look into the modulus (%) operator. |
Forum: C Oct 12th, 2009 |
| Replies: 2 Views: 247 First, format your code (http://www.gidnetwork.com/b-38.html).
Second, explain what you need help with. Don't make us guess. |
Forum: C Oct 12th, 2009 |
| Replies: 1 Views: 334 #1) No code tags
#2) void main() is wrong -- see this (http://www.gidnetwork.com/b-66.html)
#3) No formatting makes the code difficult to follow -- see this (http://www.gidnetwork.com/b-38.html)... |
Forum: C Oct 12th, 2009 |
| Replies: 1 Views: 281 I do. And nothing is EVER urgent here. Read the Rules, please. |
Forum: C Oct 3rd, 2009 |
| Replies: 5 Views: 412 You need to format your code (http://www.gidnetwork.com/b-38.html) before posting...
No idea what you are asking. Distinct prime factors? Of what? Show us an example... |
Forum: C Aug 12th, 2009 |
| Replies: 4 Views: 688 To get a binary value from a decimal value
v = val %2; -- v will contain the value of the ones digit. Then, after you get the digit, remove it to get the next digit:
v = val /2;
Loop until val... |
Forum: C Aug 7th, 2009 |
| Replies: 7 Views: 368 |
Forum: C Aug 2nd, 2009 |
| Replies: 34 Views: 1,222 weird is not an approved IT term. Be specific. Give details. What is the first question your mechanic would ask if you told him "my car is acting weird?" |
Forum: C Aug 1st, 2009 |
| Replies: 5 Views: 411 C'mon guys, the answer is simple.
Because it was designed as a procedural language. Simple as that. |
Forum: C Aug 1st, 2009 |
| Replies: 10 Views: 707 NEVER use void main() (http://www.gidnetwork.com/b-66.html) |
Forum: C Jul 31st, 2009 |
| Replies: 6 Views: 277 1) Accept input from the user
2) Open the file
3) Read a line
4) Use strcmp() to see if the measurement is at the beginning of the line
5a) If not, back to 3
5b) If so, close the file and... |
Forum: C Jul 29th, 2009 |
| Replies: 8 Views: 282 Nothing wrong. A char type can hold values from -128 to 127 only, a total of 256 values. So, 321 is too large and the extra basically falls out the end.
321 - 256 = 65
128 - 256 = -128
An... |
Forum: C Jul 28th, 2009 |
| Replies: 3 Views: 352 You have a ; you don't want at the end of the while statement:
while ((c = getchar())!=EOF);
if(islower(c)){
++letter[c-'a'];} |
Forum: C Jul 26th, 2009 |
| Replies: 3 Views: 628 Well, I suppose the first thing you could code is the input function and get that out of the way...
Yes. How to modify your code? Replace the integer data field with your structure data. The... |
Forum: C Jul 23rd, 2009 |
| Replies: 7 Views: 537 Code tags explained:
1) in the Rules (http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies) you were asked to read when you registered
2) in the text at the top of this forum
3) in... |
Forum: C Jul 21st, 2009 |
| Replies: 7 Views: 495 :icon_idea: Maybe we can all learn from the Ancient one... :icon_wink: |
Forum: C Jul 17th, 2009 |
| Replies: 14 Views: 902 |
Forum: C Jul 12th, 2009 |
| Replies: 13 Views: 620 Add a do-while loop around the main portions of the code. At the end of the loop simply ask a question. Input the answer and the while conditional can exit the loop or not.
But, you should read... |
Forum: C Jul 11th, 2009 |
| Replies: 5 Views: 488 Some graphics error is like telling your mechanic "my car made a noise" and expecting him to fix it.
Info! There are sticky posts at the top of the forum list that explain what we need to help... |