5,676 Posted Topics
Re: And more terrible code... Please stop posting just to boost your ego. | |
Re: 1) Don't create variables with _ as the first character. That's used for internal values 2) [I]top, bottom, whole[/I] are probably integers. | |
Re: [QUOTE=virendra_sharma;]Hi , can you plz explain it with code :) thanks for your help[/QUOTE] No. We to not write homework programs for people. That's [B]your[/B] job as the student. We can help you when you get stuck, but based on your posts, you aren't stuck since there's no attempt to … ![]() | |
Re: [QUOTE=hiimhenryyy;]Hi, This is my first post here at DaniWeb. I've been using it as a resource through out my assignments. I am truly eager to learn C++, but I've gotten stuck. All I am trying to do is average an array of numbers, but I haven't been able to even … ![]() | |
Re: You obviously didn't try everything. Including reading the Member Rules. | |
Re: [QUOTE=YAMNA MIDHAT;]can you please give me the algorithm to convert English into Latin .I want an example like if there is a word "test" than what would be it in Latin.[/QUOTE] 1) Buy a Latin-English Dictionary. 2) Look up English word in the dictionary. 3) Read the Latin translation given. … | |
Re: See [url=http://www.gidnetwork.com/b-59.html]this series[/url] of posts. | |
Re: Yeah, can you finish his homework for him? He has to pass the class, you know. | |
Re: You only gave us half the information. The starting file data. It helps to give us the ending file data so we know the target we're shooting at. You also didn't tell us exactly what the "[I]little help[/I]" you needed was. Just that you needed help. Explain in detail your … | |
Re: Lots of great pics [url=http://apod.nasa.gov/apod/]here[/url] can be turned into wallpapers. | |
Re: [QUOTE=jingda;1640206]C++ will not and should not die because I just started learning it...[/QUOTE] That's the most compelling reason why C++ cannot die. [B]Jingda[/B] just started using it! | |
Re: Comare your input for [B]sign[/B] and [B]answer[/B]. Do you see anything missing? | |
Re: [QUOTE=Briinaa;]Hello fellow members of daniweb[/quote] Hi [QUOTE=Briinaa;]I've been rattling my brain for some time now on how to use a number code of sorts [/quote] I've never played with "[I]a number code of sorts[/I]". How do they work? Are they different from [I]numbers[/I]? How? [QUOTE=Briinaa;]to output the name of a … | |
![]() | Re: [QUOTE=Burn August Red;]right, I remember doing stuff like that in class with the remainder. but I can't really remember how to code that in terms of weeksworked = hoursworked / 40;[/QUOTE] Then you'd better start reading your book and asking questions in class. We are not a tutorial forum. Nor … |
Re: You aren't testing [ICODE]Board[Row][Col-1][/ICODE] nor [ICODE]Board[Row][Col+1][/ICODE]. Wouldn't two nested loops be better than all those IF statements?. | |
Re: What does "[I]my code for the maze generator is not working[/I]"? Are we supposed to guess? | |
Re: [QUOTE=Narue;]What part of non-portable is difficult to understand? [QUOTE=BCBTP;]I don't understand what your talking about. I need something like _getch(); using just the standard libraries(or less). And no Operating System specific libraries/headers.[/QUOTE] [/QUOTE] Clear and succinctly: There is [I]nothing[/I], repeat [b]nothing[/b] like [iCODE]getch()[/iCODE] that is 1) portable 2) not O/S … | |
Re: [QUOTE=Fbody;]>>[B]But instead of showing A, 2, ..., J, Q, K, it shows 1 to 13. How can I convert 1, 11, 12, 13 back to A, J, Q, K?[/B] You'll have to use conditionals (i.e. an "if" statement) and alter the output based on the value. [/QUOTE] I would use … | |
Re: [QUOTE=Zssffssz;]Oh, why can't I just extract the code widows runs when cls is called and put that in my program? [/QUOTE] Go for it... | |
Re: What did you expect to be displayed? Where did you put that value into TotalCS? Did I miss it? | |
Re: Just use it. The compiler will compensate for you. | |
Re: [QUOTE=Richiemiz;]The assignment is to make a program that can read data from a file and give out the wind chill, average temperature, average air speed, and average wind chill. It must also reject data that has a temperature (in fahrenheit) of larger than 50 or an air speed of larger … | |
Re: Guys, making post after post after post is not the correct way to deal with a forum. [B]Think[/B] about your post before you type it in. If you need to add something, [B]EDIT[/B] the post, don't just make another post. | |
Re: [QUOTE=dospy;1660304]>> Basically, because you didn't call it properly, you've unintentionally overloaded the function, but you don't have a definition/implementation of the overloaded version. i think you'r wrong about that, you cant declare a function as this [CODE] b.getLeafCount(); [/CODE] you must use :: operator to tell the compiler that it … | |
Re: [QUOTE=cscgal;]Well, the test is over, and unfortunately I was very disappointed in the results. There seemed to be no increase in user activity on the site at all without the ads. [/QUOTE] I'm curious as to why you feel a single day test would show different user activity. Who would … | |
Re: 01000100 01100001 01101110 01101001 01110111 01100101 01100010 01010010 01101111 01100011 01101011 01110011 | |
Re: [QUOTE=zzou;] The conditions that i want to add in the loop is as follows : [CODE](sentence[type] == 'Z' ) putchar ('A'); (sentence[type] == 'z' ) putchar ('a'); (sentence[type] == ' ' ) putchar (' ');[/CODE] the problem is that i don't wana use the if else if loop in that.so … | |
Re: I see two things immediately. 1) Prime numbers are integers, not doubles. 24.5 does not have prime values. This will make your code easier to deal with. 2) Your [url=http://www.gidnetwork.com/b-38.html]formatting[/url] makes the code very difficult to follow. If you want others to read your code, make it easy for them … | |
Re: Out of all that information above, not one question was asked, not one problem you have was mentioned. Since we aren't "The Psychic Programmers Network (R)" we have nothing to look for. Try adding details you want answered. | |
Re: [B]%p[/B] = Pointer; address format [B]arr+3 = arr[3][/B] -- just two different ways to access the 4th array element | |
Re: [QUOTE=ryanfsf;]when i run the program, just "mahasiswa 5" that appears, how to make it show "mahasiswa 1" until "mahasiswa 5"[/QUOTE] Put the print statement in a loop. | |
Re: Look up the format of [I]printf()[/I]. Use that info to do your conversion. | |
Re: Depends on the assembler. There are dozens of possibilities. | |
Re: Actually, if you need to simply accept input, you don't need [icode]kbhit()[/icode] at all: [code=c] c2 = 0; // reset c2 to 'nothing' c1 = getch(); // wait for a key if (c1 == 0) // check if it's a function key { c2 = getch(); // it is, get … | |
Re: When you enter your code, 1) how many keys to you actually press? 2) how many characters, therefore, are in the input buffer? 3) what are they? 4) how many characters does the [iCODE]code = getchar()[/iCODE] retrieve? 5) are there any characters left in the buffer? If so, what? | |
Re: What does "[I]it doesnt work[/I]" mean? Are we supposed to spend our time trying to figure out what it does wrong? Or could you simply explain what it does wrong so we know what to look for? | |
Re: And what seems to be the problem and where is it in your code? | |
Re: [iCODE]strcmp()[/iCODE] | |
Re: [QUOTE=minimi;]I'm writing a reverse Polish calculator. If the input is 1 2 - 4 5 + *, the output should be 9, but I'm getting -9.[/QUOTE] [code] [u]1 2 -[/u] [u]4 5 +[/u] [u]*[/u] 1-2 4+5 [u]-1 9 *[/u] -1 * 9 -9 [/code] Looks right to me. | |
Re: [QUOTE=bennetk2;]I am getting a big problem at the end of my arrange function. It reads the last line of code in the function, but then never leaves the function. I don't care about output at this point. I just want to figure out why I can't leave the function and … | |
Re: How would you do it on paper? What are the exact steps? Write the steps down. If that doesn't help completely, ask specific questions about the steps. | |
Re: Then hide the quick-reply on threads that are older than N days. And from the standpoint of "significant number", as far as mods are concerned, yes. And from the standpoint of "other forums", who cares. We are not "other forums". We are allowed to be better than them. I worked … | |
Re: [I][B]What's the difference between an Airplane and a Helicopter?[/B][/I] An airplane is designed to supply thrust and works with the air using the science of aerodynamics to create lift. A helicopter simply beats the air into submission. | |
Re: [QUOTE=hugo17;]Ok, It's my turn of trying a different way of solving the problem: . . . SO how do you like my code?.[/QUOTE] It's bad... 1) Two years too late 2) No formatting making the code hard to follow 3) Using [ICODE]fflush(stdin);[/ICODE] -- not defined for input streams 4) Using … | |
Re: You aren't thinking clearly. Here is your code: [CODE] for(int x=0; x<strl1+1; x++){ // Why are you going forwards? Won't this add // the carry to the wrong value? sum=num2[x]+num1[x]+carry; // Where did you initialize carry? It could // be 7023479 because it's uninitialized if(sum>9){ carry=1; // True } else{ … | |
Re: If you want help, you need to explain the problem and actually ask a question. |
The End.