5,676 Posted Topics
Re: [B]sizeof()[/B] returns a binary value. Decimal and Hexadecimal are simply display values of those binary values to the user. If you see hex values it's because your [I]cout[/I] has been told to display the value as hex. | |
Re: [CODE] while left(line, 8) <> "INIT0000" READ NEXT LINE wend do PROCESS LINE READ NEXT LINE while left(line, 8) <> "INIT0001" [/CODE] | |
Re: [QUOTE=Orymeyer;] can any on explain me,the significance of talking i+=2??[/QUOTE] It's a shorthand version of [ICODE]i = i + 2;[/ICODE] | |
Re: [QUOTE=asitmahato;]try to avoid the header file conio.h.[/QUOTE] Do. Or do not. There is no try... :icon_mrgreen: Appropriate statement is "[I]Avoid the header file conio.h.[/I]" Everything else [B]asitmahato[/B] said is correct. But remember, in English there is a SPACE after every period. Period. Note the SPACE. End transmission. -30- | |
Re: [QUOTE=efigen;]I have one problem, i have to put some special cases in there like it cannot allow (1+2+A) and (1+2 5+4) if these happen then i write invalid sequence to the output file. Help please. [/QUOTE] Look at each character one at a time. What are the acceptable characters that … | |
Re: Use PKZIP, WinZIP, WINRAR, 7ZIP, or any other file archiving software. | |
Re: [QUOTE=Schoil-R-LEA;][QUOTE=jbennet;]He has the choice to go to a real university where they teach you relevant technology........[/QUOTE] In that case, he'd be studying HTML and either Python or Ruby right now, and we wouldn't be having this conversation (or at least not for another few semesters). While I have used C++ … | |
Re: You threw out the correct answer already. It's [iCODE]getline()[/iCODE]. You read the line and [I]parse[/I] the values from it. 1) read the line (say [I]grab val1 var2 freak3[/I] 2) retrieve the first value, the command ([I]grab[/I]) 3) remove the first value leaving the parameters ([I]val1 var2 freak3[/I]) 4) execute the … | |
Re: No. You have to read the file and search in the buffer you read. | |
Re: [QUOTE=Onlineshade;1636595]I think you want this....[/QUOTE] Why would you add [ICODE]conio.h[/ICODE] and [ICODE]getch()[/ICODE], yet not remove [ICODE]system("pause");[/ICODE] -- both being unacceptable? How about correcting it properly with [ICODE]cin.get()[/ICODE] or [ICODE]cin.getline()[/ICODE]? | |
Re: Before inserting data into the file, remove the commas and quotes. Then write the data. [iCODE]instr()[/iCODE] might help. | |
Re: No it's not good. Doing his homework for him is NOT good. It's called [B]cheating[/B], something we try to [I]avoid[/I] on these forums. | |
Re: [QUOTE=himgar;1634385]Here's a book for you to have your concepts clear: [url]http://bit.ly/qmRTsK[/url][/QUOTE] I would recommend a better book. 1) He's from India -- the home of teaching with 20 year old tools 2) He recommends Turbo, Borland, both very old compilers. 3) The code in the chapter questions use [ICODE]void main()[/ICODE] … | |
| |
Re: You simply parse each string (argv[1], argv[2], ...) one at a time. Decide on a parameter format and parse based on your decision. For example, my style is [iCODE]prog -iInputfile -oOutput -tTimeValue -nNumeric [/iCODE] So if any string doesn't start with a -, the parameters are improperly formed Then test … | |
![]() | |
Re: [QUOTE=jemz;]Thank you in advance and i am hoping for your positive response.[/QUOTE] Do you actually type this into each and every post? Or do you cut and paste it from somewhere? Is it really a necessary phrase in each and every question? To be honest, it's been annoying for about … | |
Re: [QUOTE=1150;]Can anyone help? New programmer trying to write Program that prompts user to enter name of file to display on screen. User is given to option to display another file until the user ends program. it is not working and. After compilation when 1 is chosen it scroll the question … | |
Re: First, look at the actual CSV file and get a feel for the pattern of commas and quotes. Then figure out how you'd separate the data. Now how do you translate that into code? | |
Re: And to the [iCODE]KeyUP()[/iCODE] event, stop playing the note. | |
Re: [QUOTE=MissPixel;1633789]WoW, it isn`t like we learn in school.. :O But, tnx for reply... ^____^[/QUOTE] That's because your school teaches 20-year-old techniques on 20-year-old software. They don't bother teaching today's C/C++. | |
Re: Please ignore [B]fr3aky[/B]'s poorly formatted unreadable code. It will teach you very little that is useful. [B]fr3aky[/B], here we do not not give programs to people, we help them solve their own problems. And when we post code the [I]help[/I], the code is formatted, readable, and useful. | |
| |
Re: They have a very good sound. There didn't seem to be anything Indian/Pakistani about the sound other than the lyrics. Sounded like a totally western style to me. | |
Re: [CODE] void loop() { char str1[] = "G1"; char str2[] = "G28"; if (strcmp(str1, "G1") == 0){ //turn dispenser on digitalWrite(2, HIGH); } if (strcmp(str2, "G28") == 0) { //turn dispenser off digitalWrite(2, LOW);} } [/CODE] Could you explain to us when will these IF statements be false? | |
Re: In [iCODE]filer::makefile()[/iCODE], why are you setting a boolean value [I]truly_random[/I] to NULL? It's boolean. Values are [B]true[/B] and [B]false[/B]. You also test it for 1. Again, [B]true[/B] and [B]false[/B]. And based on your code, you will [I]never[/I] call [iCODE]srand()[/iCODE] since [I]truly_random[/I] will never be 1 | |
Re: [QUOTE=krulex;]I have made a following program that will convert lower case letters in to upper case and upper case letters will remain same and that will be done Realtime (as character is typed). [CODE]#include<stdio.h> #include<conio.h> void main(void) { char ch; printf("Type a sentence: "); while (ch!='\r') { ch=getch(); if (ch … | |
Re: [QUOTE=diwakar wagle;]Note:Toggle plain text and copy it somewhere else If it's too hard to read due to indention.[/QUOTE] Note2: Then don't post poorly indented code. Use 4 SPACEs instead of TABs and indent correctly. | |
Re: Do [B]NOT [/B]use the registry. As a new programmer you may destroy your system. As [B]debasisdas[/B] said, "[I]The simplest thing to do is to check system date on start up.[/I]" Which means you need to look up the [I]Date[/I] functions in VB. There are at least 2 that will help … | |
Re: How about [iCODE]choice != 0[/iCODE]? Why a number like -999? | |
Re: That's because none of the graphics you are using is part of Dev-C++. That's the old (very old) Borland compiler. | |
Re: [QUOTE=HASHMI007;][CODE]#include<iostream.h> #include<stdlib.h> #include<conio.h> //using namespace std; int main() { int i,j=0; cout<<"1"; for(i=1;i<=55;i++){ if(i%2==0||i%3==0||i%5==0) cout<<" "<<i; j++; } getch(); return 0; }[/CODE][/QUOTE] What was this code posted for? Without any description at all, my guess is how not to program in C++ since about 1/2 the code is bad and … | |
Re: [QUOTE=raptr_dflo;]Adding a function should be sufficient. Since you already have code that can step through a date-string and divide it into pieces, it should be easy for you to write a function that steps through and verifies that the pieces are the correct length and contain valid characters.[/quote] Yes, this … | |
Re: [QUOTE=Anuradha Mandal;]Just use the header file #include<conio.h> It supports getch().[/QUOTE] And what if my compiler doesn't [I]have[/I] conio.h? Most of them do not! Unless it's required, [I][B]never[/B][/I] use non-portable techniques to do things that can be done without tricks like this one. [ICODE]getchar()[/ICODE] is the appropriate function to use. | |
Re: You don't have a loop that runs the fight 5 times. All you have is a loop that tosses the coin 5 time. Think carefully about your loop, braces, and indentation. | |
Re: Don't post 681 lines of code when all you're interested in is 70 lines. Makes the problem harder to find. | |
Re: Tell you what. [I]You[/I] explain as best you can what each line does, and we can help you correct your assumptions. The biggest problem with this code is the structure. -- No whitespace to make things easier to read. -- Lines that do too much and should be broken into … | |
Re: Your calculator seems to be extremely complex for the task as stated. [CODE] if minutes > 0 then hours++ ; If "part thereof", add 1 to hours subtract minhours from hours ; calculate hours over minimum charge = mincharge + (hours * hourlycharge) [/CODE] | |
Re: You need to look up the file and directory routines of your compiler and/or operating system that's the starting points for this program then write some test programs to test what you are learning make them small and simple notice what happens when you don't bother writing in sentences just … | |
Re: What do you know about reading directories in C? | |
Re: Not a clue. Can't read the error message, you don't tell us what line it's on, and your indenting is baaaad. | |
Re: [QUOTE=Ketsuekiame;1624577]You will need either files or a database (such as MySQL).[/QUOTE] Which are files :icon_rolleyes: | |
Re: Wrong solution!!!! Do [B]not[/B] use [iCODE]fflush(stdin);[/iCODE]. [url=http://www.gidnetwork.com/b-57.html]Here's why[/url]. And when asking a question, "[I]... these solutions give me an error[/I]" is not an appropriate message to give us. There are hundreds of errors -- be [I]specific[/I], both in the [B]exact[/B] error message, and the line the error is on. | |
Dani, are you playing around with the links for New Reply? When I middle-click on a thread title, the link opens in a TAB as it should. But the new-reply icons don't all of a sudden. I can't tell if it's you playing around or me because I screwed something … | |
Re: Give it a try and post your attempt (with more details) and we can help. | |
Re: [QUOTE=sergent;1624780]something like this:[/QUOTE] How'd you come up with that ([I]unformatted[/I]) idea? | |
Re: [QUOTE=Narue;]A common way to end the loop is with end-of-file:[/QUOTE] Or by choosing an exit character and not looping forever. | |
Re: [QUOTE=largedimples;1020041][B]Will some one please help with the topological sort problem. What am I doing wrong? Thanks in advance for your help!! [/B][/quote] 1) Using a useless [B]BOLD[/B] for your question 2) Not using CODE tags 3) Not explaining what your problem is 4) Not telling us about where in your … |
The End.