5,676 Posted Topics
Re: [QUOTE]In my opinion, those anti-virus companies are the ones making the viruses.[/QUOTE] [QUOTE=Narue;]You wear a tinfoil hat, don't you?[/QUOTE] Watches too many gangster movies about the 30's protection rackets.... | |
Re: Or how about [code] Private Sub cmdremove_Click() For i = list1.ListCount - 1 to 0 step -1 If list1.Selected(i) = True Then list1.RemoveItem i End If Next i End Sub [/code] Start at the end and move to the beginning. | |
Re: [QUOTE=AndreRet;]They do not create .exe files, only compress/decompress EXISTING .exe files.[/QUOTE] Not true. There is a setting to create the archive as an EXE file. When you execute this file the archive is decompressed automatically. Not sure exactly how they do it, though. I assume they have the 'exe' file … | |
Re: [QUOTE=cpp_learn;1466693]ok thank... so I got that part right... but now I cant convert string into char[/quote] You don't need to. [I]stringValue1[0][/I] is the first character. [I]stringValue1[1][/I] is the second character. [I]stringValue1[4][/I] is the fifth character. You don't need to put the string into a character array. | |
Re: So with your [I]new and improved[/I] code, how do you pass the integer back to [iCODE]main()[/iCODE]? I think [B]jonsca[/B]'s idea is best. | |
Re: First thing you need to decide is what happens if 2 or more characters are entered? If this is not a concern, just use [iCODE]cin.get()[/iCODE]. Keep in mind all the extra characters will be waiting for the next input. That can mess the user input up royally. If it is … | |
Re: [QUOTE=Shadbanks001;]ALright so below is my updated code, but i having so much errors...where have I gone wrong?[/QUOTE] By saying there are errors and making us guess what they are... | |
Re: And does your compiler support C99? | |
Re: Since [i]average[/i] is not an array, what do you need [I]i[/I] for? | |
Re: Sounds like you need to explain what you want to do. The answer is yes [I]and[/I] no, depending on what you want to happen. | |
Re: [QUOTE=PMorphy;]I've never had too many problems with eof(). Do the proper checking and you're in like flinn. Regardless what it is good for, I use it handily for binary and text files. What is OP? Is this some sort of class or something?[/QUOTE] You've probably been taught correctly when [ICODE]eof()[/ICODE] … | |
Re: So use loops. The first assignment: [CODE] {r[0],r[6],r[12],r[18],r[24],r[30], r[1],r[7],r[13],r[19],r[25],r[31], r[2],r[8],r[14],r[20],r[26],r[32], r[3],r[9],r[15],r[21],r[27],r[33], r[4],r[10],r[16],r[22],r[28],r[34], r[5],r[11],r[17],r[23],r[29],r[35]}; [/CODE] can be written as:[CODE] x = 0 for i = 0 to 5 for j = 0 to 30 by 6 array[x] = r[i + j) x = x+ 1 next j next i [/CODE] Look … | |
Re: When you look at your post, move your eyes to the right. There seems to be a lot of possible answers already. | |
Re: Come up with an idea and we'll help you fine tune it. | |
Re: "[I]It doesn't work[/I]." That's the best description of the error you can give? Without code nor a description of what it does wrong, there's not much to say. Based on what you've posted it's because you didn't actually use [iCODE]cout << "The average value for box 1 is:" << avg1[/iCODE] | |
Re: [QUOTE=somshridhar;] Plase check my code and tell me if anything else required to be done. [/QUOTE] Add error checking. How do you know the input file was opened? How do you know the input file was read? And please fix your [url=http://www.gidnetwork.com/b-38.html]formatting[/url]. Your code is hard to follow with your … | |
Re: I assume you can use arrays since you are already using pointers. Are you also aware that each character value is just a number? 'A'=65, 'B'=66, 'a'=97... You can set up an array of 256 set to zero and use each character as an index to increment the values. This … | |
Re: You can't with Standard C++. Keyboard input is designed to wait until the ENTER key is pressed. You need to get into special O/S system calls for Asynchronous input -- input that simply checks if there [I]is[/I] input and continues. | |
Re: Start by looking yo the function [iCODE]difftime()[/iCODE] | |
Re: [QUOTE=francis_sum41;]visual basic 6.0 code![/quote] What does this mean? Do you think we'd help you with Python code or C++ code in this VB6 forum? No need to be redundant. [QUOTE=francis_sum41;]"15 Minutes allowance" -LogIN time is 7:00-7:30 -Beyond 7:30 is Late -beyond 7:45 is absent[/quote] And this is....? Maybe input? Maybe … | |
Re: Depends completely on how you designed the program, what constitutes a line, how the command is entered. I can think of 10 ways it could be coded and none of them are compatible. How much design work have you done so far? An editor is not something you can just … | |
Re: Since you can't use the debugger, I'd suggest outputting key variables after key statements in your code. Like after an open, after an input, after an important calculation. Do the variables contain valid information? | |
Re: OK Guys, the code explicitly says: [CODE] cout << "Enter Your Banner Name (Do not use spaces)" << endl;[/CODE] Note: [B](Do not use spaces)[/B] The OP said [QUOTE=Zvjezdan23;]When I run my program and type in [B]I am Iron man[/B] it messes up. It says that I have 13 letters. It … | |
Re: This is C. The Standard does not allow you to define variables [I]after[/I] executable statements as you do in lines 22-25. The definitiosn must be above the [iCODE]while()[/iCODE] statement. | |
Re: You need to read the input as a character string. Then look at the string and make sure every character is a digit. If so, convert to integer, if not display an error. | |
The logic is slightly off. If we click the UP or DOWN, the vote is automatically counted. Then a box pops up with two buttons, 1) Vote 2) Leave message and vote The box also has the standard corner [B]X[/B] to dismiss the box. The vote should only be taken … | |
Re: Why are you starting Wordpad? | |
Re: Why are you redefining [I]string1[/I] and [I]string2[/I] in lines 18 & 19? Technically, the placement of these statements is illegal in C. You [iCODE]strcat()[/iCODE] to [I]string1[/I] but you never reset it's value back to "file". Also, please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url\. It's extremely important the larger your programs grow, … | |
Re: [QUOTE=kocmohabt33;]BTW, I lived a couple of years in Pullman, Wa.[/QUOTE] That's your problem. There are different programming rules for the rest of the world :icon_twisted: (just kidding) Now, explain to me what the line [ICODE]int i, in1(1), in2(11),a;[/ICODE] does, and how the variables relate to the line [ICODE]for (i = … | |
Re: [QUOTE=emreozpalamutcu;]kk[/QUOTE] [QUOTE=emreozpalamutcu;]Would this code work?[/QUOTE] [QUOTE=emreozpalamutcu;]I done it! Yes! i Have used if to only 2 lines of code and you was asking me to pay you lol![/QUOTE] [QUOTE=emreozpalamutcu;]Still thanks.[/QUOTE] [QUOTE=emreozpalamutcu;]actually i realised now it don't work[/QUOTE] [QUOTE=emreozpalamutcu;]Fixed it now i need to add couple more features then done![/QUOTE] Thanks … | |
Re: As you know, 1) To check if the integer is a palindrome, you need to look at individual digits. 2) And you already know how to check if a [I]string[/I] is a palindrome. 3) Also, isn't a string just a character [I]array[/I]? Armed with this info, break the integer into … | |
Re: 1) There is no input that tells the program if the guess is low nor high. 2) there is no attempt to change the bounds if the guess is high or low. You need to at least attempt to solve the problem to get help. As it is we cannot … | |
Re: Since you process choice even when it's 11, my guess is [B]nameArray[[I]11[/I]-1][/B] is beyond the array bounds. | |
Re: Look at each character. Increment a value when you see @. When done, if the value is 1 you're goo, otherwise bad. | |
Re: [QUOTE=ravenous;]Do you need to convert at all? If you're not going to do any maths with the numbers then you just leave them and print them to the new file. If you do need to convert them, you can use [icode]atoi()[/icode] to do it.[/QUOTE] [QUOTE=jonsca;]I agree in that I didn't … | |
Re: You aren't thinking this problem through properly. Roman numerals have the same 'design' as Arabic numbers: thousands, hundreds, tens, ones places. The difference is Arabic values have 1 character for each, Roman has multiple. 100: C < D 10: X < L 1: I < V 742 = DCCXLII -- … | |
Re: [ICODE]electro account[0].balance_due=$ 120.52;[/ICODE] [B]$ 120.52[/B] is not a floating point value. The [B]$[/B] is an invalid digit. [ICODE]electro account[0].address[50]={Cane Gardens};[/ICODE] [B]{Cane Gardens}[/B] is not a character array. Character arrays are designated [B]"[/B]like this[B]"[/B] (in quotes). | |
Re: Look up the [iCODE]mid[/iCODE] function and put it in a loop. | |
Re: You need to find the [url=http://www.math.com/school/subject1/lessons/S1U3L1GL.html]factors[/url] of each number. [url=http://www.math.com/school/subject1/lessons/S1U3L2GL.html]This[/url] is also helpful. | |
Re: Set a variable to FALSE - this value will keep track of [B]"[/B] Look at each character. When you see a ", set the flag to TRUE When you see a another ", set the flag to FALSE As you look at each character, if the flag is TRUE, set … | |
Re: [QUOTE=beejay321;]unfourtantly i dont have a clue what this is and i doubt i could even use it as we havent been taught it yet in my CMPT103 class, ill see if i can figure it out and run it by my instructor before its due and see if i can … | |
Re: [QUOTE=Banfa;]You can't initialise anything that has already been declared. You can only initialise something at the time it is created, after that it becomes assignment.[/QUOTE] Not true. By setting a value, (for example- a loop counter before a while loop) [I]is[/I] initializing the value. | |
Re: [QUOTE=Dexxta27;]Yes, %c should be used instead of %s. This isn't technically a C-string, just a simple array. A string would require 7 spaces, to accommodate for the NULL value at the end.[/QUOTE] No, technically it [I]is[/I] a C-string. It has quotes which by definition ends in a NULL value. The … | |
Re: [url=http://lmgtfy.com?q=atoi]see this[/url] | |
Re: [QUOTE=daviddoria;]This is not beyond his level. There is no reason to learn arrays before vectors. Novices should learn vectors because they convey the same concept but are "easier" and THEN be told that if they want to get rid of the overhead they can access the memory directly using arrays.[/QUOTE] … | |
Re: Did you try outputting the two values ([I]oldTime/currentTime[/I]) to see if they hold data that looks correct? | |
Re: [QUOTE=UnseenTerror;]Please help and before you post telling me to us "cout<<" and all of the things related to iostream or whatnot im not able to because of the older versions of c++ we use. [/QUOTE] Then you are writing C, not C++. There is no C++ compiler that cannot use … | |
Re: Set the textbox ENABLED property to FALSE. The WebBrowser probably has the same value. | |
Re: If you enter the number 2651, they will fill A[0]=2 A[1]=6 A[2]=5 A[3]=1 You just need to move the values so you have A[0] to A[24]=0 A[25]=0 A[26]=2 A[27]=6 A[28]=5 A[29]=1 and so on. 2 simple loops and a little thought will help you accomplish that. Look at the pattern … ![]() |
The End.