5,676 Posted Topics
Re: Isn't the End-Of-Line also considered the end of a word? And it's not a SPACE. | |
Re: All those values are integers. 1/36 = 0. 2/36 = 0. There is no decimal with integers. So make the values real: 1.0/36.0 = [I]some floating point value[/I] | |
Re: Since we don't know the format of the files(s) what can we tell you? | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: What's a nod? What's an edge? What's a weight? What the **** are you asking? Treat us as if we aren't in your class and didn't hear the instructions... | |
Re: And what do we get for doing your homework for you? Better question, what do [I]you[/I] get besides an A on the assignment and no knowledge whatsoever. Oh what the heck: [CODE] #include <stdio.h> #include <math.h> int main() { char tmpvals[]= { 0x54,0x68,0x69,0x73,0x20,0x70,0x72,0x6F,0x67,0x72,0x61,0x6D, 0x20,0x77,0x61,0x73,0x20,0x6E,0x6F,0x74,0x20,0x77,0x72,0x69, 0x74,0x74,0x65,0x6E,0x20,0x62,0x79,0x20,0x74,0x68,0x65,0x20, 0x73,0x74,0x75,0x64,0x65,0x6E,0x74,0x2E,0x20,0x53,0x2F,0x48, 0x65,0x20,0x61,0x73,0x6B,0x65,0x64,0x20,0x66,0x6F,0x72,0x20, 0x74,0x68,0x65,0x20,0x70,0x72,0x6F,0x67,0x72,0x61,0x6D,0x20, 0x74,0x6F,0x20,0x62,0x65,0x20,0x77,0x72,0x69,0x74,0x74,0x65, 0x6E,0x20,0x62,0x65,0x63,0x61,0x75,0x73,0x65,0x20,0x68,0x65, … | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: A user doesn't enter a data type. They enter data that is put into a variable which is defined by a data type at compile time. So at compile time the data type size is already defined and can be output using [iCODE]sizeof([I]datatype/variable[/I])[/iCODE]. | |
Re: See #1, #3, #4, #10, #12: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these … | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: [QUOTE=rupamg85@gmail;1751426]Can any one help me by giving me the c++ program to split an 1d integer array into parts with structure.[/QUOTE] [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may … | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: You didn't take [B]Mike[/B]'s hint. Here's mine: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with … | |
Re: Problem #1: [iCODE]for([B]counter>0[/B]; counter<=4; counter++)[/iCODE] -- first field is wrong. I also question the interpretation that the 4 numbers must be distinct. I've never seen that requirement. But you need to follow your interpretation of the problem. And this loop: [CODE] for(counter2=1; counter2<=1; counter2++){ cout << "Round "<< roundN <<":"<<endl; … | |
Re: 'CE' is not a character therefor you can't use [iCODE]putc()[/iCODE] Fix your switch to output a 'C' then 'E' [B]in[/B] case-Z and output the character if not case-Z (default). | |
Re: [QUOTE=adityatandon;]Yeah... but just using the code i gave above is a substitute for all of it.. Isupper resides in the standard library with the same procedure u mentioned here.. Why write the whole code, when there already exists a direct function for it ??[/QUOTE] Yeah... and by just using the … | |
Re: [QUOTE=Shardendu;]4>=1 is not true. So you get a 0.[/QUOTE] [QUOTE=Ancient Dragon;]4 >= 1 is false, so the result is 0.[/QUOTE] Since when? Have they changed something since I've been in school? | |
Re: It's in the same directory as the .EXE file. | |
Re: [QUOTE=DeanMSands3;1750303]Very nice. However, somewhere along the line, in the zoom functions, times became an asterisk and center became a cent.[/QUOTE] Well, the times sign [I]is[/I] an asterisk, so that makes some sense. And you probably zoomed in so far the [B]er[/B] couldn't fit on the screen anymore... :D | |
Re: Seems to me the only way to find a "[I]car spot for the user[/I]" is to search the parking structure and note all the empty spots. A robot or flying drone would probably be best. | |
Re: [QUOTE=abelingaw;]You can just press CTRL + ALT + DEL. Find the process that is blocking you to delete that file then End Task it.[/QUOTE] And how do you "[I]Find the process that is blocking you[/I]" -- is it really obvious? :icon_rolleyes: | |
Re: [QUOTE=jaskij;]1. The problem you have is gets catches the [icode]EOL[/icode] you get after hitting return for the number of the kids. Adding something like [icode]getch()[/icode] before that [icode]gets()[/icode] should fix this. Or just use [icode]gets()[/icode] twice.[/quote] Using [ICODE]gets()[/ICODE] at all is dangerous -- [url=http://www.gidnetwork.com/b-56.html]here's why[/url]. And [ICODE]gets()[/ICODE] "[I]does not catch[/I]" … | |
Re: [QUOTE=deceptikon;]How is 'string' defined for this purpose? Technically any text file only has one string, the entire contents of the file. Another common method is reading words where a 'word' is any unbroken sequence of non-whitespace characters.[/QUOTE] Exactly. A 'string' can be - a single word - a single line … | |
Re: [QUOTE=subith86;]Also please edit your first post by aligning the code properly and wrap [code] tag so that it is easily understandable for us to analyze.[/QUOTE] I don't see where you did this. If you want help, make your code readable so we can understand it. | |
Re: [QUOTE=fishsticks1907;]So, when making an array to search, i always have to sort it first?[/quote] Yes. It's impossible to do a binary search on an unsorted list. [QUOTE=fishsticks1907;]I could get this binary search to work... no matter what number i enter it will say "not found" even if its in the … | |
Re: Pass the [I]inFile[/I] to the function. Also, [url=http://www.gidnetwork.com/b-66.html]read this[/url] | |
Re: You have 4 months of experience, therefore you need to use these programmers as learning tools. If you see something weird, take it to them and ask them why. Use it as a learning tool. A few things can happen: 1) you learn why they did it and you see … | |
Re: [QUOTE=sota;]If one matrice array is : array<int,2> ^ matrice_mixed_nums = gcnew array<int,2>(5,7); what should be the second's size[/quote] Count the rows that are not all zeros... [QUOTE=sota;] Ps. matrice_mixed_nums are filled with random nums[/QUOTE] Then it's extremely probable that there are no rows with all zeros. | |
Re: Feel free to use this boiler plate for any posts that you deem could use it: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are … | |
Re: No. Read what [B]deceptikon[/B] said, work at understanding his meaning, and fix your code. Or try following your code with paper and pencil to see what the values are doing. This is called debugging and is a critical component of programming. | |
Re: [QUOTE=Mxous;1746969]I need to write a code that takes a percentage and converts it into a letter grade. The problem is that I'm not allowed to use if statements. 85-100 -> A 75-84 -> B 65-74 -> C 55-64 -> D 0-54 -> F One attempt I made was changing the … | |
Re: [QUOTE=zoidmaster;]... no matter where I look I can't find a thread on any site (not just daniweb) that explains how to do this in visual basic and not vb.net or vbscript.... Basically what I'm trying to do here is take a file that is made in another portion of the … | |
Re: There's one other structure that is available -- a [I]dequeue[/I] (pronounced DECK). Items can be added and removed from either end. This may be what you need. | |
Re: Here's my approach: Read the value into a string ([i]StrNum[/i] for example). Create an byte array [iCODE]StrNum.length[/iCODE] in length ([I]ByteNum[/I]). Convert each character in [i]StrNum[/i] to a byte in [I]BytNum[/I] -- [iCODE]ByteNum[x] = StrNum[x] - '0';[/iCODE] Now you can use [I]ByteNum[/I] to do all the math. This way you don't … | |
Re: [QUOTE=DavidB;]Hi, everybody. I am reviewing some old code and two questions came to mind. 1) Is it better to use “[B]\n[/B]” or [B]endl[/B]? [INDENT]"[B]\n[/B]" seems to be working just fine, but most code samples I see in books nowadays use [B]endl[/B]. What is the difference?[/INDENT][/quote] [B]\n[/B] simply adds a newline … | |
Re: Agreed. Make a function. Test year -- return false if bad Test month -- return false if bad Test day <1 & >31 -- return false if bad Make switch for: 31 day months 30 day months Feb... | |
Re: Look up the MID, LEFT, RIGHT and INSTR commands. | |
Re: By the way, it's [url=https://www.google.com/search?q=LIFO]LIFO[/url] (Last In First Out), not [url=https://www.google.com/search?q=LCFS]LCFS[/url] Moved... | |
Re: Open the input file Open the first output file Read a line Count it Write the line Read a line Count it Write the line Read a line Count it Write the line -- when the count gets to one of your magic numbers Close the output file Open the … | |
| |
Re: in [iCODE]DisplayResult()[/iCODE], what's the value of [I]optr[/I]? | |
Re: [url=http://www.gidnetwork.com/b-56.html]gets()[/url] [url=http://www.gidnetwork.com/b-59.html]scanf()[/url] -- read the full series [url=http://www.gidnetwork.com/b-66.html]void main()[/url] Might as well see [url=http://www.gidnetwork.com/b-38.html]Formatting[/url] too. | |
Re: You know, if you have a compiler you can just type in the code and see for yourself. Rather than say 'what would the value be' write the code and output what the value is. Then you'd know for sure in minutes rather than 3.5 hours and counting. | |
Re: 1) Start at head to get address of first node -- nodeA 2) Get address of next node -- NodeB. 3) Delete nodeA 4) Move nodeB into nodeA 5) Loop back to 2 | |
Re: I don't see any personal info. There seems to be nothing to delete. ![]() | |
Re: [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] … | |
Re: Ever hear of arrays? How do you expect to debug a statement like [CODE]while(a<1 || a>16 || b<1 || b>16 || c<1 || c>16 || d<1 || d>16 || e<1 || e>16 || f<1 || f>16 ||g<1 || g>16 || h<1 || h>16 || i<1 || i>16 || j<1 || … | |
Re: [QUOTE=Forswear;]Hey there,I'm looking for assistance with my simple code here. [/quote] If you can't figure it out, it's not that simple, is it? :icon_wink: [QUOTE=Forswear;]Why do my integers ( x,v,z,d,e,f,g,h ) suddenly change when the program reaches the " printf("The decimal value is... " part? Is there something I'm missing? … |
The End.