136 Posted Topics

Member Avatar for taikoprogrammer

Here are just some "tidy up" suggestions: 1. Your [B]j (of type char)[/B] and [B]ptr[/B] variables are never used. 2. Rather than declaring separate variables to store each character as you read the characters of the input string for each translation, just use one. The same goes for the variables …

Member Avatar for yellowSnow
0
4K
Member Avatar for shaju_nitk

First of all some housekeeping: 1. In future, when posting code, please use code tags - see this link: [URL="http://www.daniweb.com/forums/thread93280.html"]http://www.daniweb.com/forums/thread93280.html[/URL] 2. [B]void main()[/B] is bad - use either one of the following for the signature of main: - int main() - int main(void) - int main(int argc, char *argv[]) - …

Member Avatar for yellowSnow
0
236
Member Avatar for nandakv4

You need to use the [B]realloc()[/B] function to allocate additional storage and copy the contents from the previous allocation. You are calling malloc() in your loop which is clobbering memory. You call malloc once and then call realloc whenever you need to allocate additional memory and retain the contents already …

Member Avatar for nandakv4
0
96
Member Avatar for no1zson

[QUOTE=no1zson;942210]This suggestion intrigues me. Putting my main loop inside another loop. I am not sure I understand how to do it, and it sounds almost more complicated than the problems it might potentially avoid, but if anyone can expand on this thought I would appreciate it. Again, my limited experience …

Member Avatar for hket89
0
150
Member Avatar for hket89

[QUOTE=hket89;944382]I forget the question already...hehe^^ Oups, sory...I always use sms language... This is malaysian language, haha!!![/QUOTE] Rubbish! Since when is SMS Malaysian? I'll give you a tip mate, no one likes a smart a**, especially when: 1) they post unformatted code (USE CODE TAGS!) 2) they whine for help 3) …

Member Avatar for DangerDev
0
301
Member Avatar for yasaswyg

@9868, kimaeasha and abhi.navale Why are you even attempting (and I use that term loosely) to help out yasaswyg? This poster, who is new to these forums (like me) has the audacity to call an extremely astute and knowledgeable poster (Salem) names and still expect assistance. This is my take …

Member Avatar for yasaswyg
-1
122
Member Avatar for notsogood

[QUOTE=notsogood;942823]Oh sorry, major errors occur at line 89....[/QUOTE] I would advise you to develop this program and get one function working first before moving onto the next function. Trying to write it all in one hit and then resolving all the errors is a laborious chore and an inefficient way …

Member Avatar for yellowSnow
0
120
Member Avatar for Dream2code

[QUOTE=Dream2code;937759]Hey HI all, Sory for reverting late onto this topic again. Lets look into the chart: e.g [code] ASCII EBCDIC HEX DEC BINARY A * 41 65 0100 0001 [/code] We have an ebcdic file and have onechar *(assumeed) . Now we will convert that to ASCII value. but how …

Member Avatar for yellowSnow
0
1K
Member Avatar for Hiroshe

I think you would have to look at the [B]ncurses[/B] library .. or the [B]pdcurses[/B] library for the Window's equivalent to avoid any platform specific requirements.

Member Avatar for Duoas
0
2K
Member Avatar for yellowSnow

Hello, I've recently finished watching a brilliant five-part documentary online called "The Machine That Changed The World" : a documentary on the history of the computer. It was made in 1992 and was first aired on PBS. It was also aired in Australia (where I live) in the 1990s. I …

Member Avatar for syahrizal
0
205
Member Avatar for nandini vishuu

Yes, I could, but that would be no fun for you. [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] Show some effort first!

Member Avatar for Hiroshe
0
97
Member Avatar for XMyKillX

[QUOTE=Saschakil;939028]Ask your question in the C forum.[/QUOTE] What? Last time I checked this is the C forum.

Member Avatar for yellowSnow
0
91
Member Avatar for taikoprogrammer

[QUOTE=taikoprogrammer;939303]Sorry I don't really understand. How would the computer know which numbers are even and odd when going through the array?[/QUOTE] Research and learn about the modulo operator (%).

Member Avatar for yellowSnow
0
1K
Member Avatar for yeshkadiyala

@OP I apologise if this remark seems a little out of place with respect to your query, but I would suggest that you look at using an up-to-date setup. Turbo C is pretty dated. Personally, for the Windows platform, I would recommend the MinGW toolchain in conjunction with your favourite …

Member Avatar for Salem
0
168
Member Avatar for MrNoob

Please try to phrase your question a little better. From the looks of the signature of your ParseCh function (and the somewhat hazy definition of your function) it appears that you want to parse a string of tokens delimited by the ',' character and return the first and last tokens. …

Member Avatar for Dream2code
0
231
Member Avatar for furqankhyraj
Member Avatar for Ancient Dragon
0
167
Member Avatar for varunrathi

This post is over four and half years old and it was SOLVED. Why are you reviving old threads. And there's that blasted void main again.

Member Avatar for yellowSnow
0
193
Member Avatar for Curgol

[QUOTE=tux4life;934263]>[ICODE]string ss="this is an encrytpion program";[/ICODE] Could it be that you meant: [ICODE]char ss[] = "this is an encrytpion program";[/ICODE] here? Otherwise please clarify.[/QUOTE] Besides your correction of the non-existent string type, I can't make any sense of the OP's question? I think (he or she) is "out with the …

Member Avatar for Curgol
0
2K
Member Avatar for yellowSnow

I'm still relatively new to these forums. I just like to put out a query regarding threads and their solvability. For Daniweb forums, is it considered good practice for OPs to flag threads that they have started as being solved if they have received appropriate posts that have answered their …

Member Avatar for yellowSnow
1
288
Member Avatar for Karthy

Well before you even ask a question like that, you need to understand or at least know the difference between OO languages and "procedural" languages. You ask a question with 9 words and expect a answer giving you the full rundown on why c is not considered an OO language …

Member Avatar for 9868
0
124
Member Avatar for RobBrown

[QUOTE=RobBrown;936073]What input is it waiting for? shouldnt scanf read from the printf line above it. I was using all newBalance before and it was doing the same thing. I am new to this and just generally confused with it sometimes.[/QUOTE] Take John A's advice and just use [B]one[/B] balance variable …

Member Avatar for yellowSnow
0
182
Member Avatar for makavelixx

[QUOTE=Ancient Dragon;936009]post some of the error messages. Function Search() -- Is [b]state[/b] supposed to be one of the 50 USA states? If yes, then it can not be an integer, but must be 2 character array followed by a null terminator (total of 3 characters). If not, then you need …

Member Avatar for makavelixx
0
97
Member Avatar for edenn1

[QUOTE=edenn1;936149]link to the assignment : [url]http://www.cs.bgu.ac.il/~clang092/wiki.files/assignments/assignment6.pdf[/url][/QUOTE] Here's a link for you: [URL="http://donate_to_my_bank_account.com.au/"]http://donate_to_my_bank_account.com.au/[/URL] Seriously mate, help us to help you. Rather than posting all that code and saying there is a compilation error, how about try telling us what the error is and then perhaps posting a snippet of the code …

Member Avatar for yellowSnow
0
154
Member Avatar for kou yuuzhen

Your [B]printMonth[/B] function is returning 0 when it's declared as returning void - lose it. Line of code - [B]system("PAUSE")[/B] is not portable. Your range of years is rather odd :-/ If you enter a year outside of your range - besides printing the error message, you also print the …

Member Avatar for yellowSnow
0
136
Member Avatar for gauravmishra

If you haven't noticed, this is the C forum. You should post your question in the C++ forum. Perhaps it's better if you wait for a moderator to move your question for you to the right forum.

Member Avatar for kvprajapati
0
94
Member Avatar for RobBrown

You have a semi-colon at the end of your [B]for[/B] statement in your code - that will prevent the prompting and gathering of more than one set of data. You declare a variable called [B]custDB[/B] - I think that should be [B]cust[/B]. You're applying the address-of operator (&) for the …

Member Avatar for RobBrown
0
447
Member Avatar for TheWhite

[QUOTE=Dave Sinkula;935562]Your pointer is initialized in a screwed-up way. I think you've got bigger fish to fry first. What do you think you're trying to do with your 'bit array' that isn't already done with masks?[/QUOTE] I totally agree with Dave Sinkula's response. Bit masking would be far easier especially …

Member Avatar for TheWhite
0
1K
Member Avatar for wesduncan

This is a C forum. [B]fflush(stdin)[/B] is BAD. Google it for reasons why. You say "I have a problem", without providing details of what the problem is. Go easy on the TAB key ;-)

Member Avatar for WaltP
0
98
Member Avatar for atreyeepal1

Show some effort! [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL]

Member Avatar for Dream2code
0
155
Member Avatar for gcah

I assume you are trying to count the number of lowercase and uppercase letters entered via stdin and load the counts into two separate arrays. You need to load the two arrays within the while loop whilst reading characters in from stdin. I would also change the loop condition to …

Member Avatar for gcah
0
153
Member Avatar for anuizath2007

[QUOTE=anuizath2007;930321]what are the current trends in computer field?i have no idea[/QUOTE] If you haven't noticed, this is a forum on the C programming language. You should post this message in a more appropriate forum and definitely provide more details as the term "computer field" is too broad.

Member Avatar for yellowSnow
0
53
Member Avatar for nagarayan

> Need help guys! my problem is i cannot store file data into an array of structures. I can already read the file data and also tokenized it so as to separate data. here is content of the file that i am reading: 200001, hamburger, 30.50 100000, cheeseburger, 21.00 > …

Member Avatar for nagarayan
0
2K
Member Avatar for rcbhat

[QUOTE=rcbhat;929526]I thought that the function parameters were pushed onto stack from right to left. [code=C] #include <stdio.h> main() { int i=0; printf("%d %d\n",scanf(" %d",&i),i); } [/code] But this code prints out the keyboard entered value instead of 0. Why is it so?[/QUOTE] If I enter "42", the output is "1 …

Member Avatar for wildgoose
0
126
Member Avatar for steel dr@gon

NO! .. that's not your problem ... your problem is you're not taking the time to isolate the problem and present it in such a way that people on this forum would be even remotely motivated to even think of helping you! Cheers.

Member Avatar for Dream2code
0
109
Member Avatar for msteele

[QUOTE=Salem;923170]Don't use [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351"]feof() to control a loop[/URL] Use [ICODE]while ( fgets(buffer,sizeof(buffer),myfile) != NULL )[/ICODE][/QUOTE] Hi Salem, I completely agree with your code snippet for checking EOF as C input functions return values that can be used to test for this condition. However, you could still use the feof() function to …

Member Avatar for Ancient Dragon
0
178
Member Avatar for ichie06

[QUOTE=ichie06;923662]Make A C Program That Performs The Following Algorithm: (a)Use Scan F To Input The Following Data: -assign Value 26 To Age. -assign Value 80 To Weight In Kg. -assign The Value 183.219 To Height Cm. (b)Calculate The Weight-to-height Ratio. (c)Display A Heading For The Results (d)Display The Results In …

Member Avatar for tux4life
0
109

The End.