5,676 Posted Topics
Re: Agreed. And what's a [I]wid[/I]? Is it some sort of elf or gnome? We speak [B]English[/B] here. | |
| |
Re: [QUOTE=toneranger;1670472]Hi Narue, thanks for your response. As I mentioned in my OP, i tried to upload a small csv file but daniweb would not let me.... I can email it you however if you'd like?[/QUOTE] How did you get your CODE in your post? Do the same thing with your … ![]() | |
Re: [b][boilerplate_help_info][/b][code] Posing 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=TheNNS;289404]Are there any suggestions for screwing his computer?[/QUOTE] Yeah. Grow up. If you become mature, he won't find it so funny. | |
Re: [QUOTE=mcclainra;]Please note this code is most likely terrible. It's very rough. And before anyone insults me I know I probably seem like an idiot and in programming I pretty much am.[/QUOTE] The only one insulting you is you. You code is nicely modular. Each function is defined to do one … | |
Re: Reread your text on [iCODE]printf()[/iCODE] format specifiers. Specifically the [B]%f[/B] specifier. | |
Re: [QUOTE=hkdani;]Well, it works with Microsoft's latest and greatest compiler 16.00.30319.01 for 80x86 And it works with Gnu C compiler 4.5.2, with Gnu C 3.4.5 Borland's 5.5.1 C Compiler. Microsoft's Compiler 12.00.8804 Borland's old Turbo C 2.01 Borland's C++ 5.82 I might have to dig out one of my four working … | |
Re: After you read [B]phrase[/B] and output it you throw it away and start reading the file again. Instead, just look at each character in [B]phrase[/B] and use each character in your switch. You also need to loop on the characters in [B]phrase[/B], not inputting to the end of the file. | |
Re: [QUOTE=NathanOliver;]Well you could do this [code=c++] size_t pos = 0; string sample = "The man went to the store."; while ((pos = sample.find_first_of("o", pos)) != string::npos) { if (sample.find_first_of("r", pos) == pos + 1) cout << "good"; } [/code][/QUOTE] Why? Wouldn't [ICODE]sample.find_first_of("or", pos)[/ICODE] do it in one statement instead of … | |
Re: [QUOTE=dev90;]I am not getting all numbers but only last number while readind data from file. And it has to be done with fscanf function.[/quote] See the comments: [code]/* input n nunbers fom user and write it in the file.find it's sum and write the ans. in another file */ #include … | |
Re: I would: 1) ask the user to insert the length of two sides (b and c) of a tringle 2) and the angle between them in degree (x) 3) compute and print the length of the third side,a, by using this formula a^2=b^2+c^2-2bc(cos(x)) Please Note: the angle must be in … | |
Re: Contact the owners of Borland stuff -- [url]http://www.embarcadero.com/[/url]. | |
Re: Try outputting more values so you can see if all the variables contain the expected values. | |
Re: [QUOTE=opawix;1669742]ayeshashahid, can't be done, next input will put in the nextline.[/QUOTE] Since there is only one [ICODE]cin[/ICODE], there is no [I]next input[/I]. [QUOTE=LaMouche;]You should just ask for each grade individually. Print the test such as "Prelim" and then wait for input and <enter>. This could be the resulting program output:[/QUOTE] … | |
Re: After creating and writing the file, what are you expecting to read? Where's the file pointer after a write? | |
Re: [QUOTE=clide890;1669889]Hello, I've been having problem with this problem since yesterday and i just recently started C++, so please don't judge. I have very confused to what the question is asking and how the C++ program will look like. Effective January 1st of each year, Gabriela receives a 5% raise on … | |
Re: As [B]L7sqr[/B] implied: [code] int myatoi( char *x ) { int y = ( *x - 48 ); // convert the first character into an integer // What about the second, third,... characters? return y; }[/code] Think loop... | |
Re: Any idea what "[I]a problem with the dis[0][0][/I]" is? Since I didn't run the program I can't tell what it might be. ![]() | |
Re: [QUOTE=xenan;]help please?[/QUOTE] You think people [I]live[/I] here? We'll get to your problem when we get to it. [QUOTE=xenan;]please use only this library cause I don't know how to use other libraries ...[/QUOTE] What library? I don't see any library! What are you supposed to do about the width and 1 … | |
Re: You don't have any space to store the file name read in. All you did is allocate a pointer but it doesn't point anywhere useful. | |
Re: [QUOTE=guitarguy889;]I have three methods that I wrote, readBinary(), writeBinary(), and Update(). The program compiles just fine, but it doesn't do it's intended job... ... So that takes care of THAT. However, here is where I am stuck.. I have never used opcodes. But am doing my best in my attempts … | |
Re: [QUOTE=rcowboy;]Must I use a for loop? [/QUOTE] Yes. | |
Re: [QUOTE=ath1019;1668696]can you pls give me a link to where i can download a free turbo c?[/QUOTE] [url=http://lmgtfy.com/?q=turbo+c+download]Try This[/url] | |
Re: do you understand the concept of sentences and punctuation it doesn't look like it if you are requesting help you need to make sure people can understand you thats why english uses the concept of sentences and uses punctuation its so you can communicate correctly your needs that way you … | |
Re: When will noobies stop posting questions without the information they have that can easily answer their question? When posting errors, don't post a part of the error -- copy and paste the ENTIRE error, verbatim, including line number, listed code, EVERYTHING. | |
Re: Please describe exactly what your file format is -- character by character in general terms (character digit etc...). Write that description down. Look carefully at it. What is your input statement missing given that format. | |
Re: [QUOTE=liverpiece;]How to write a tic tac toe game program in c language using int char array with the help of for & while loop[/QUOTE] Using your knowledge of the C Language and a C compiler. Why do you ask? Oh, forgive me. You didn't ask. You simply made a statement. … | |
Re: [QUOTE=cscgal;512038]I believe what he's saying is that there should be a START NEW THREAD button on the actual thread pages, next to the REPLY TO THREAD button.[/QUOTE] IMO, that doesn't make sense. | |
Re: Please describe [I]exactly[/I] what your file format is -- character by character in general terms (character digit etc...). Write that description down. Look carefully at it. What is your input statement missing given that format. | |
Re: [QUOTE=eagles39;]I have written a function to place mines. I need 'X' to be in array position [0][0] I cannot randomize so it does not overlap the mines b/c I can have only four mines in a [4][5] array. The problem I am having so that it checks to see if … | |
Re: Moody, aren't you? After that rant I'm still wondering what the post is for since not one question was asked. Just a tantrum posted. Now you're frustrated :icon_wink: | |
Re: [QUOTE=infantheartlyje;]Hi folks, [CODE] int a=10,b=5,tmp; tmp=a; a=b; b=tmp; [/CODE] This is ordinary swap. I want to do this swap to the structure variables.[/QUOTE] Make [B]tmp[/B] an instance of the structure. Move each element as you swap. [QUOTE=infantheartlyje;]And how to free the memory of tmp structure variable after swapping.[/QUOTE] Why? It's … | |
Re: [QUOTE=totalanonymity;](all constructive criticism welcome):[/QUOTE] OK, here goes. You have a function called [B]userEntry()[/B]. Because of the name all the function should do is input data from the user and return the value(s). Then, make a function to calculate the surface area and return the value. Make another function to calculate … | |
Re: [QUOTE=dineshz;]I have a problem with this code. [/QUOTE] Here's what I see as your major problems: Lack of [url=http://www.gidnetwork.com/b-38.html]proper formatting[/url] makes the code difficult to read [ICODE]#include<conio.h>[/ICODE] -- using non-standard header. It's not portable and (as you can see from [B]VernonDozier[/B]) you can't get adequate help. [ICODE]#include "gotoxy.h"[/ICODE] -- Same … | |
Re: [QUOTE=gerard4143;]You could try something like below [code] thisNumber += atoi((char*)&i);/*This only works for Intel/AMD type integers*/ [/code][/QUOTE] [ICODE]atoi()[/ICODE] only works on c-strings, not on characters. [B]ZedChu[/B]'s original code was better: [ICODE]i = (i - 48);[/ICODE], though his loop is incorrect. [CODE] while ((i = getchar()) != '\n') { thisNumber *= … | |
Re: Take the modulus 10000 of the date to get the year Divide by 10000 Take the modulus 100 of what's left to get the day Divide by 100 etc | |
Re: Do you understand how to correctly do the problem by hand? | |
Re: You cannot define a function ([iCODE]RadiusofTwoSpheres[/iCODE]) in the middle of another function ([iCODE]main()[/iCODE]) | |
Re: [QUOTE=Ancient Dragon;]You have to copy the characters you want into the new arrays. In your example you will have to declare four character arrays (not pointers!) that are [I]3 characters each, the 3d one is for the null terminating character[/I].[/QUOTE] No, only 2 characters each. He wants [I]character arrays[/I], not … | |
Re: Then you did it wrong. But you didn't bother to show us what you did, so we can't be more specific. And [B]u[/B] is not an English word. Please don't use leet speek on the forums. | |
Re: Why are you printing in the middle of the sort? Don't you need to sort [I]then[/I] print the sorted list? [QUOTE=kleyva;]I'm sorry its so horribly written:[/QUOTE] Then [url=http://www.gidnetwork.com/b-38.html]read this[/url] and don't write horrible code anymore :icon_wink: | |
Re: [QUOTE=Ich bin würdig;]Can someone help me in building a syntax for this problem Write a program that accepts a positive integer and gives its prime factorization that expresses the integer as a product of primes. Here's one that I did:[/QUOTE] [CODE] #include<stdio.h> #include<conio.h> // remove, not needed void main() // … | |
Re: [QUOTE=Zssffssz;]Ok the thing I searched into google brought up a ton of nonsense. [/QUOTE] Lack of understnding does not make the information nonsense... [QUOTE=Zssffssz;]I want to use variables from a function in main...[/QUOTE] Pass the values back to [I]main()[/I] when the function returns. [QUOTE=Zssffssz;]... and (more important) variables from main … | |
Re: Hi, I have to write a program which makes changes and writes to a different text file. The point at which I am stuck is that I am unable to add the value 10 to ASCII value of each of the first 6 characters in the file. Why not? All … | |
Re: Because [B]3.3[/B] is not [B]3.3[/B] in computers. Floating point is inaccurate. [B]3.3[/B] could really be [B]3.300001[/B] or [B]3.299998[/B]. | |
Re: [url=http://lmgtfy.com/?q=rocket+guidance+system]this is how[/url] | |
Re: Create a desktop icon for the program and move it into your Start:Programs:StartUp folder. At least that's where they go in XP | |
Re: You sure do. Try asking a lucid question in your post explaining exactly what you want to do. Your title is nonsensical. | |
Re: First, [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so we can follow it. That is necessary if you need others to read your code. If you aren't sure if you are correct for 2, 3, & 4, try running the program. That will tell you whether you are correct or not. |
The End.