- Strength to Increase Rep
- +9
- Strength to Decrease Rep
- -2
- Upvotes Received
- 43
- Posts with Upvotes
- 38
- Upvoting Members
- 16
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Integration Specialist
- Interests
- Music, Computers/Programming, Reading, Playing guitar, Aussie Rules Football, Cricket
136 Posted Topics
Re: I downloaded TC3 and tried it out (ahh .. the not so good memories) and I get the "black screen" thing happening as well. For me I have to wait 10 to 15 seconds when switching from TC to any of my other running Windows applications. I get a delay … | |
Hello, I am trying to parse a string using regular expressions. This string can potentially have any number of non-alphanumeric characters acting as delimiters. These delimiters can also be grouped together. Here are some examples of the data: 00923:5342:123 --> I want to extract 00923, 5342 and 123 into an … | |
Re: alloca is similar to malloc in that you can allocate memory dynamically, however the memory is automatically freed when you exit the function that called alloca. With an array you can't compute the storage required at runtime. | |
Re: <rant> For crying out loud, is this a forum on how to shortcut the English language? Sometimes it feels like it's a tutorial on how to read friggin' SMS messages. [QUOTE=hket89;941743]Then u noe hw 2 use do-while loop mar?[/QUOTE] u=you, noe=know,hw=how, 2=to, mar=anyone's guess [QUOTE=hket89;942042]Could u gv me the website … | |
Re: Ok here we go: - you're missing the semi-colon after your declaration of the variable [B]n[/B]. - you haven't declared the variables [B]i[/B] and [B]count[/B]. And you don't need the [B]count [/B]variable. Just print the value of [B]i[/B]. - remove the semi-colons from the end of your for statements - … | |
Re: Just a few things to take note of: 1. This thread is almost five years old. 2. On the previous point and your request for help - a full working example was given by Narue (again 5 years ago). As Narue stated - there are tons of examples for these … | |
Re: [QUOTE=herrel17;989805]I am making a program to compute simple interest. P*R/100 this is what i have done... Please tell me whats wrong [CODE]int main() { int p,n,count; float r,si; count=1; while(count<=3) { printf("\n enter values of p,n,andr"); scanf("%d %d %f",&p, &n, &r); si=(float)p * (float)n * r / 100; printf("simple interest … | |
Re: [QUOTE=RIsagara;1028142]Hi Modify this where possible[/QUOTE] And what exactly do you want to modify? Ask a specific question. | |
Re: [QUOTE=Salem;948609]So what have you learnt (or even attempted) in the past two weeks? [url]http://www.daniweb.com/forums/thread208111.html[/url][/QUOTE] Obviously not that much. Here's an idea, drop that Turbo C crap and move on to decent compiler/IDE setup. | |
Re: [QUOTE=THEOUTLANDER;1027980]ok i have made a calculator using turbo c but it keeps disappearing when i choose the run command can any body help me please [/QUOTE] Well congratulations on bumping a five year old thread. In future, start a new thread. | |
Re: [QUOTE=Anjoe18_Edica;990396]can u hlp me about modulu and looping statement?[/QUOTE] This old thread has been accidently revived. Stop posting on this thread (I know this is rather hypocritical of me). Start a new thread and for crying out loud, formulate a proper question. Your rather vague question has no relation to … | |
Re: Oh for crying out loud. Stop being such a cry baby. You have posted enough messages now to know that you should be using code tags. WaltP has kindly asked you on at least two occasions to use tags and you just choose to ignore the advice. Since you're too … | |
Re: [QUOTE=A Tripolation;1034933]Hmm...no man, that only makes it a LOT worse, but thanks for trying. I appreciate it. Here's some rep ;)[/QUOTE] At any rate, if you haven't noticed, this is a forum on C not C++. You should post your questions in the correct forum. | |
Re: The modulus operator (%) requires integral data types for its operands. At any rate x % 1 is zero. | |
Re: [QUOTE=ch.ankit87;1033962]can you please help me by elaborating this.i mean with full program[/QUOTE] You need to show some effort - you will not get answers for "free". Read this: [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] | |
Re: Post your code - or at least the minimal amount that compiles and illustrates your issue. Also, "if" is not a function. | |
Re: Well, can't you just change the algorithm you used for the limit of 20 and adjust it to 100000? Perhaps you can post the code you have already. | |
Re: [QUOTE=LostnC;1027671]Here's what I have so far. I am trying to enter a number and convert the number entered into hours, minutes and seconds. I must use "pass by reference" in my code. [code=c] #include<stdio.h> void time(int, int*, int*, int*); //Function Prototype int main(void) //function header { int hold; float total; … | |
Re: [QUOTE=seo2005;1026840]I want to write a C program to test whether the character is uppercase, lowercase, digit or special symbol. void main () { char ch; printf("\n Enter any character from the keyborad"); scanf("%c",&ch); if (ch>=65&&ch<=90) printf(" \n the character is uppercase); if(ch>=91&&ch>=122) printf(" \n the character is lowercase); if(ch>=48&&ch<=57) printf("\n … | |
Re: [QUOTE=Gaiety;979541]Please let me know what is bb tags, and how to use that. thanks, Gaiety[/QUOTE] Read the material at this link: [URL="http://www.daniweb.com/forums/thread93280.html"]http://www.daniweb.com/forums/thread93280.html[/URL] On the front page of this forum, there are a number of threads at the top which as a "newbie", you should read as well. | |
Re: Do you mean that you want to print 10 primes per line? If so, then use the col variable to count the number of primes that have been output for the current line. Check the count and if it's 10, print the newline character and reset col to 0. [CODE=C] … | |
Re: [QUOTE=dkalita;1021493]use getch()[/QUOTE] Just be wary that the getch() function and the associated conio.h header file are not portable. | |
Re: Mmm ... interesting. I always thought that bitwise operators were only valid with integral operands. The only way I can think of using bitwise operators with floats/doubles is to use casting pointers. Perhaps something like: [CODE=C] int isNegative(float f) { int *ip = (int*)(&f); return (*ip & 0x80000000 ? 1 … | |
Re: [QUOTE=MrNoob;1019162]you can use code blocks it's cool[/QUOTE] I concur - Codeblocks is good. But I use Eclipse far more often as it has support for other languages that I use (for work and for play). So for me, it's a "one-stop" shop as far as an IDE is concerned. And … | |
Re: [QUOTE=darkw1sh;1020027]I actually had a bad experience with that when A classmate stole my work turned it in and i got in trouble :([/QUOTE] I'm sorry that you had this experience. But it's going to be awfully difficult for anyone here to help without some code to look at. At least … | |
Re: [QUOTE=dragonbone;1019405]HI , I am a student in an university... I am assigned a project about the knight's tour on the chess , but must use the Warnsdorff's rule ... rule : Put a knight on the chess with any square , and find all patchs of knight (knight pass each … | |
Re: Using scanf for strings, you will run into trouble if your input string contains whitespace. Only the first word will be reversed. Also, in your reverse function, you are assigning the null incorrectly - it should be: [CODE=C] p[i] = '\0'; [/CODE] and not [CODE=C] s[i] = '\0'; [/CODE] Also, … | |
Re: Why are you even posting this piece of crap as a code snippet? Code snippets are usually posted by more knowledgeable members of this forum who have something useful to share with the rest of the community. That piece of rubbish should have been posted as a normal thread and … | |
Re: And what do you want us to do you? You're just plain lazy. Do some work and show some effort. You obviously haven't read this sunshine: [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] | |
Re: Like so many other ignorant newbies that come to this forum, you obviously haven't read this: [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] | |
Re: I would probably store your times in [B]int[/B] variables. This variable would store the times in seconds. Then for the final result, I would divide by 60 to get the number of minutes and use the modulus operator to get the seconds. If you need to store fractions of seconds, … | |
Re: In your haste to getting a quick answer you obviously didn't read this: [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] | |
Re: With the char* string case you're trying to modify a string literal. This link to the C FAQ explains it better: [URL="http://c-faq.com/decl/strlitinit.html"]http://c-faq.com/decl/strlitinit.html[/URL] | |
Re: Try: [CODE=C]sprintf(myStrings, "%02X%02X%02X%02X", myHexas[0], myHexas[1], myHexas[2], myHexas[3]);[/CODE] And use unsigned char for your data type. | |
Re: You're over-complicating this a bit. Have a look at the following snippet and see if you can follow what it does: [CODE=C] for (j = NUMBEROFBITS-1; j >= 0; --j) { if (i & (1 << j)) putchar('1'); else putchar('0'); } [/CODE] NUMBEROFBITS is defined as the number of bits … | |
Re: What should you do? Learn Java. It's going to be difficult to do the translation if you don't know the language you're translating to or from. At any rate, a line-by line translation is not going to be possible as you will have to write equivalent C code to emulate … | |
Re: NO - void main is bad! At least use the signature int main() or int main(void) at the very least. | |
Re: [QUOTE=sweetjhin;1010815]uhm .. Good day everyone. I would just like to ask if anyone knows what code to use in Turbo C wherein the user will input the year and the program will output the calendar for the whole year. Please help me. Thanks a lot :)[/QUOTE] You obviously haven't taken … | |
Re: [QUOTE=yasaswyg;1007880]Hey guys I am stuck with this program and i need help with it this is what i got until now [CODE] #include <stdio.h> #include "checkit.h" double vectorDotProduct(double x1, double y1, double z1, double x2, double y2, double z2) { return(x1 * x2 + y1 * y2 + z1 * … | |
Re: [QUOTE=ajju.gr8;1007803]I'm in trouble with data structures mam.. i want to finish my lab work soon so please any gals/guys help me.. i need c coding in expression tree...[/QUOTE] In your haste to get a quick answer to your very poorly worded question, you have missed reading this: [URL="http://www.daniweb.com/forums/thread78060.html"]http://www.daniweb.com/forums/thread78060.html[/URL] Addressing people … | |
Re: A quick reply from the "style police": Use code tags please and repost: [URL="http://www.daniweb.com/forums/thread93280.html"]http://www.daniweb.com/forums/thread93280.html[/URL] | |
Re: > start quote: **** * *** and ** ** *** * **** > well my teacher wont say a thing and have passed this act. now our teacher is a different one and i can't still figure it out.. help pls??... > > :S > > the only loop i … | |
Re: [QUOTE=maddy1985;1006594]When the program is given a multicast address it should print the corresponding mac address, along with a list of the 32 overlapped multicast ip addresses. ./ipcalc.pl 224.1.1.1 255.255.255.255 Class D (Multicast) Address: 01-00-5e-01-01-01 Overlapped Addresses 224.1.1.1 224.129.1.1 225.1.1.1 225.129.1.1 226.1.1.1 226.129.1.1 227.1.1.1 227.129.1.1 228.1.1.1 228.129.1.1 229.1.1.1 229.129.1.1 230.1.1.1 230.129.1.1 … | |
Re: [QUOTE=Mazaoa;1006236]i don't have code.simple plz[/QUOTE] Here we go again - another lazy poster. If it's so simple then work it out for yourself. You obviously haven't taken the time to read the rules and ethics on how to post to this forum. | |
Re: [QUOTE=sweetsympathy17;1005890]aahahaha! im not really in on reading rules sorry! im a newbie and just first year in my class so sorry to all disappointment! ^_^! im glad to join this forum!![/QUOTE] Mmm ... you're not really into reading rules. There are many members of this forum who won't be "really … | |
Re: Just a few points: Always use curly braces for your for statements (and other control mechanisms as well e.g. while) - it will save you a lot of heartache especially later on if you decide to add more lines of code that should be executed as part of the for … | |
Re: [QUOTE=Ineedhelpplz;999733]error was simple. The function was encapsulated into main rather than outside. However, my desired result is not coming out. Now I need some suggestions with the actual code. Thanks![/QUOTE] Gees, you really like doing things the hard way. Here's a simple code snippet that outputs the character:hex representations of … | |
Re: [QUOTE=osei-akoto;952724]Please can somebody explain to me whether sometimes the strrev function fails or not. I was giving an assignment to write an application that can detect whether an entered word from the keyboard is a palindrome or not. After accepting the string and tried to use the function from the … | |
Re: I suppose you still believe in the tooth fairy, Father Christmas and the Easter Bunny. No one - and I mean no one is going to help you out based on the effort you have put in. Read this: [URL="http://www.daniweb.com/forums/announcement118-2.html"]http://www.daniweb.com/forums/announcement118-2.html[/URL] and this: [URL="http://www.daniweb.com/forums/thread93280.html"]http://www.daniweb.com/forums/thread93280.html[/URL] and then this: [URL="http://www.daniweb.com/forums/thread78060.html"]http://www.daniweb.com/forums/thread78060.html[/URL] I'll bet London … | |
Re: [QUOTE=firstPerson;999319]Create two int variable. Ask user for input Check if input is valid if so the proceed else go back to get user input start a for loop from i = 0; i < L; start another loop ( nested loop ) that ranges from j = 0; k < … |
The End.