6,741 Posted Topics
Re: Um, just include the libraries you know are needed. Consider this a lesson in writing portable code: the compiler is not a replacement for your brain. | |
Re: >1. I did not see the first two ones in the Fibonacci sequence. Probably because those values weren't printed. They're in the generated sequence though. frrossk's program kind of sucks anyway. >Also, can you tell me that the a and the i means in this program?? a is an array … | |
Re: Holy excessive comments Batman! Just FYI, if you find yourself commenting nearly every line of code with multiple lines of comments, either your code is far too opaque and needs some serious attention toward readability, or you're including too many unnecessary comments. In reality well written code needs fewer comments … | |
Re: 1) Sailor Moon (for sentimental reasons) 2) Haruhi Suzumiya no Yuutsu 3) Tenshi na Konamaiki | |
Re: >Or use memcmp, which essentially does this. memcmp uses a shallow byte-by-byte comparison, so depending on the type of items in the array this might not be a good idea. | |
Re: [QUOTE=Saranya Ravi;]Could anybody please tell me some competitive certification exams for c and c++[/QUOTE] There are none that I'm aware of. Sure, you can find certifications for C and C++, but they are hardly respected in the professional world. It's a waste of money, in my opinion. | |
Re: The vector handles its own memory. You only need to free pointers that were explicitly allocated with new. | |
Re: Please elaborate on which parts you don't understand. Otherwise all I can do is restate the same thing in a slightly different way and there's enough information that I'm uninterested in typing it all out on my iPad's less than ideal keyboard. | |
Re: [B]I need some good Ideas about final year projects....[/B] We get at least ten threads a month from idiot students who somehow managed to get the final project without a clue. Perhaps you should read some of those threads instead of adding your own. Or, for a more enlightening experience, … | |
Re: [QUOTE=rajwant51]sir it is my request to you plese give me idea how to write c- code for screen saver i.e. using c languahe[/QUOTE] Gimme a G! Gimme an O! Gimme another O! Gimme a G! Gimme an L! Gimme an E! Goooooooo GOOGLE! | |
Re: >help me in aproper way Say please, jerk. The least you could do is show some respect to the people who are volunteering their time to help you for nothing in return. >i could print characters in reverse but not words Okay, you can print the characters in reverse now … | |
Re: Did you do any research at all? It's not like C has so many functions in the standard library that realloc is hard to locate. | |
Re: C++ is extremely limited in the values you can use. For example, the int data type is only guaranteed to hold the values -32,767 to 32,767. A large integer like 9999999999999999999999999 can't be stored in a single variable of any type. So you get around it in one of two … | |
Re: [ICODE]b=c/d++[/ICODE] and [ICODE]b=(c)/(d++)[/ICODE] are equivalent. The parentheses don't have any effect on how that expression will be evaluated. [B]>Is my understanding correct ?[/B] You're a little confused, but mostly correct. It makes more sense if you use functions instead to illustrate the unspecified order of evaluation: [code] #include <stdio.h> int … | |
Re: Start with the summation, because that's easy. You already seem to know about taking the remainder of ten to get the least significant digit and dividing by ten to slice it off. Remember to keep it as simple as possible. When you do this with more than one loop, you're … ![]() | |
Re: Each of these are rather broad topics. Can you cut it down to specific questions so we don't have to write page after page of tutorials? | |
Re: >return *i2 - *i1; Eew. Can we say integer overflow? >return (x < 0) ? 1 : (x > 0) ? -1 : 0; Eeeeew! Nested conditional statements are fugly and hard to follow. How about this: [code] int compare ( const void *a, const void *b ) { return … | |
Re: So do you have a real question or are you just another lazy leech who wants other people to do his homework? | |
Re: I'd be happy to, first you'll need to start up your favorite image editing software... Seriously, did you honestly think that C or C++ had a built in capability to do this? [code] #include <image.h> int main ( void ) { draw_image ( ".gif" ); return 0; } [/code] Sorry, … | |
Re: [QUOTE=wonderland;1222716]Hi, Didn't know which section to write this in. :( I would like to know how could I delete two of my threads, since they show up on google search and I don't want them to. Of course editing would be an option, but lately edit post button only shows … | |
Re: >I would really like to see more ladies in this business! I am male! I'm sure that's a completely selfless desire. ;) It's amusing to watch how women are treated in the field. In my case, it's always assumed that I'm lacking in knowledge or experience. This is odd to … | |
Re: [B]>no I DIDN'T read the rules[/B] Then don't complain when you're punished for breaking the rules you didn't bother to read. [B]>cuz people who read the rules are for people who don't have their own website[/B] So having your own website means you can break the rules on somebody else's … | |
Re: Dave is one of the few people online I consider a good friend. Daniweb will be far less fun now. | |
Re: >I will be thankful if u help me solving it.. What kind of "help" were you expecting? It looks to me like you want us to solve the problems for you and then give you the completed programs with no effort on your part, which isn't going to happen. Ever. | |
Re: First, do you really need set methods? Most of the time you can use constructor arguments to set the fields and set methods aren't required: [code] Scanner in = new Scanner ( System.in ).useDelimiter ( ' ' ); System.out.print ( "Full name (ex. John Smith): " ); String first = … | |
Re: [B]>Unfortunately I can't find where I can delete my account?[/B] You can't delete your account. Just don't visit the site anymore. It's really that easy. :icon_rolleyes: | |
Re: >I've been trying to get it to work but it just won't. That's because you're trying to get a dinosaur to drive a ferarri. Turbo C 2.0 is a DOS compiler, and I don't mean the Windows command prompt, I mean [b]real[/b] DOS. It's ancient, and nobody is surprised that … | |
Re: [QUOTE][CODE]if ((letter >= 'A' && letter <= 'Z' ) || (letter >='a' && letter <= 'z')) { printf(" %c is a CONSONANT\n", letter); }[/CODE][/QUOTE] If it's a letter at all, you always say it's a consonant. If you separate error checking from processing, you can eliminate that problem: [code] if … | |
Re: >I think it is something to do with srand( time(NULL); Nope, your logic is just wrong if you want game to end at exactly 1001. Notice how you don't check that condition every time game is incremented. You only check the condition after the inner loop has terminated. game could … ![]() | |
Re: Start by thinking of the ways the linked list (because this [i]is[/i] a linked list) could trip you up and thwart it. For example, what if there's a cycle where the pointer points back to a previous node? Come up with a dumb brute force solution first, just to understand … | |
Re: [B]>I just want what is owed to me. Do I have a chance?[/B] If you didn't get the terms of your employment in writing, you don't have a chance. Your best option is to quit a bad job gracefully and move on. Burn bridges or not at your discretion. Two … | |
Re: [B]>IMO, clones are like animals since their not a creation of god or evolution[/B] Is this the underlying issue? Personally, I don't see a problem with treating clones the same as naturally born creatures of the same species. The end result is the same, so who cares what the process … | |
Re: Know-it-all douchebags don't usually have a special place in my memory unless they were especially fun to smack down, but yes, I do vaguely remember you. ;) | |
Re: >Unfortunately, I don't remember much While interesting (well, not really), your post has no meaningful content relevant to this thread. If you're incapable of helping, there's no point in posting to inform everyone of it. | |
Re: >I would like to kind of get is jist of how much they make. It's a well known statistical fact that CS majors (like all other college students) make minimum wage, at best. Once they get into the field they make anywhere from less than $20,000 to over $100,000. The … | |
Re: [INLINECODE]p->link = q;[/INLINECODE], perhaps? It's hard to say with your little uninformative guessing game. | |
Re: >// function definition -- requires process.h The only header needed for that function is <cstdlib>. | |
Re: Yes, I'm sure plenty of people here will help you. | |
Re: >I was wondering if you can check my answers for the first one and help me get a start with the second one The first one looks fine. Your problems with the second one makes me wonder. >It's more complicated than what I am used to. So basically anything that … | |
Re: You realize that the only thing in common with Java and Javascript is the word Java, right? What's wrong with just linking to a text file? At least that way you can fit more programs on a single page and the browser doesn't screw up the formatting by trying to … | |
I noticed that the icode button was removed from the post editor. Why? | |
Re: [code] char a[256]; // Static allocation char *p = new char[256]; // Dynamic allocation [/code] >and why is supposed to be so popular in use? You aren't restricted to a "one size fits all" strategy, and you can generally grab more memory from the dynamic pool than from the "stack". | |
Re: [code] int get_code(char c) { string alpha = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; return static_cast<int>(alpha.find(c)); } [/code] | |
Re: Just look at each character in the array in sequence. When you find sentence stopping punctuation, the first non-witespace character after it should be capitalized like so: [code] a[i] = toupper ( a[i] ); [/code] And don't forget to include <cctype> ![]() | |
Re: >above will give u 4,3,2 on windows VC++ It doesn't matter, the behavior is undefined. Your results can vary not only between compilers, but between different versions of a single compiler. And don't bump old threads. >printf(4) is NOT C++, quit using it. printf is standard C++, as are all … | |
Re: >Whats the main difference between the two file types? There's a huge difference, not the least of which is complexity. A .com file is nothing more than raw binary that starts at the 256th byte in memory, or 100h. This format is very old (originating from CP/M days, IIRC), and … | |
Re: Check out the tree tutorials [URL="http://www.eternallyconfuzzled.com/jsw_home.aspx"]here[/URL] for a simple ASCII art method I use to draw trees. | |
On the top level forum list [LIST] [*]Not being able to collapse categories constantly irritates me. [/LIST] In a forum [LIST] [*]Need a link back to the forum list [*]Mark forum read and page links are at the bottom of the page. These should be available at the top of … | |
Re: [QUOTE=Real-tiner]They used C, which explains why Windows crashes so often.[/QUOTE] That's an ignorant overgeneralization. You meant to say "The used C [b]poorly[/b], which explains why Windows crashes so often." |
The End.