5,676 Posted Topics

Member Avatar for yelugamraghu

[QUOTE=jephthah;610856]get rid of the [b]long[/b] type cast. that's what's hurting you here. Furthermore, since you've already defined everything as a [b]double[/b] anyhow, you have no need to do any type casting at all. they already are doubles. this is all you need to do to get your answer: [code]beloeb = …

Member Avatar for jephthah
0
273
Member Avatar for yelugamraghu
Member Avatar for Ancient Dragon

Gee. IE -- strike one. Vista -- strike two. Only need one minor thing to go wrong and -- strike three. You're OUT! :icon_wink:

Member Avatar for Nick Evan
0
228
Member Avatar for Ancient Dragon

ICODE is not meant for multiple lines of code. That's what CODE tags are for. Extra whitespace on a single line of code may or may not be useful. I probably agree that ICODE should retain whitespace, but not EOLs.

Member Avatar for Nick Evan
0
218
Member Avatar for InfinityArc

Or add output statements to display values as the program runs with the location within the program.

Member Avatar for InfinityArc
0
133
Member Avatar for mattyd

Interesting.... A few comments -- opinions, to be sure (except the first): [B]Theories[/B] are not facts. The are based on observations and [I]seem[/I] to hold true, but aspects of the theory still have not been proven. That's why they are called [I]theories[/I] instead of [I]facts[/I]. [B]Creationism[/B]: According to Isaac Asimov, …

Member Avatar for ~s.o.s~
3
10K
Member Avatar for sagz

[QUOTE=sagz;605761] I had been thinking along those lines, but probably way off with...[CODE]if ( choice != "y","Y")[/CODE][/QUOTE] Yes, you're off. You have to test each character individually. Something along the lines of [icode]if ((n < 5) || (n == 10))[/icode] which is TRUE if [I]n[/I] is 4 or less [I]OR[/I] …

Member Avatar for sagz
0
157
Member Avatar for linux

[QUOTE=linux;341658]Sorry if this belongs elsewhere, it's BASIC, so VB is the closest. (By the way, long time no post for me, I'm back, yay) Okay. I'm writing a game (a SRPG) in QBASIC (wicked leet, huh?) so that my friends can edit it and crap (I know other languages, but …

Member Avatar for gugus
0
150
Member Avatar for ArNy

[quote=WolfPack]As for syntax changes, I tried the Professional Version for some time, and the major irritation was that the use of functions like strncpy has been [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncode/html/secure03102004.asp"]deprecated [/URL]in favour of microsoft specific functions like strncpy_s. So you may get a lot of compiler warnings saying this and that is deprecated, …

Member Avatar for lwxmeme
0
498
Member Avatar for helloan

[QUOTE=helloan;598425]Is there anyway to do this without using rewind? We haven't learned this yet.[/QUOTE] Just close and open the file again.

Member Avatar for jephthah
0
169
Member Avatar for El Duke

A stack makes sense. That way you'd be able to catch problems like [icode]This is a <I><B>mismatched tag pair</I></B> too.[/icode]

Member Avatar for El Duke
0
541
Member Avatar for a2008

[QUOTE=a2008;590212]Hi, I was hoping someone could shed some light on this for me. I am stuck on an assignment. I have spent 3 weeks on it and have almost finished it. I have so much going through my head at the moment I just need some help. Please. I do …

Member Avatar for Nick Evan
0
148
Member Avatar for sickly_man

[QUOTE=sickly_man;590080]so i cant actually return a number like in C or C++? in other words, the RETURN statement in my get_fore and get_back subroutines is incorrect/illegal? so i guess i will have to put these values in registers before i do the return statement, right? it seems to me then, …

Member Avatar for sickly_man
0
138
Member Avatar for w0090463

I'm with [B]Aia[/B] on this topic. Although compilers treat \0 and 0 the same, they are not, since one is a character and the other is an integer. It has to do with human perception, not compiler equivalences. It's the same as teaching children to dial [I]nine-eleven[/I] in case of …

Member Avatar for ajay_kumar47
0
174
Member Avatar for superjacent

[QUOTE=superjacent;483639]Thanks for the advice, very much appreciated. I've altered the code as suggested and is a lot 'cleaner' looking. [/quote] Not bad, although it's still not [url=http://www.gidnetwork.com/b-38.html]formatted properly[/url]. By the way, what does [ICODE]cin.clear();[/ICODE] do? You might want to look it up. Another thing to look at is [ICODE]system("PAUSE");[/ICODE] [url=http://www.gidnetwork.com/b-61.html]See …

Member Avatar for jade09091990
0
188
Member Avatar for spuddy1515

First, get rid of the clear screen stuff since you cannot make it portable and is not part of standard C++ Second, get rid of the GOTO statement and use a while loop instead Third, you say you want the "[I]second out put replaces the first[/I]" so change your output …

Member Avatar for spuddy1515
0
118
Member Avatar for rje7

[QUOTE=rje7;569274]im building a telephone directory. and the code is given below. i am using file system to store the record which i get from the user. and then i should be able to do searching, deleting, sorting and other default telephone dir functions. so far i have been able to …

Member Avatar for Salem
0
87
Member Avatar for Dani

I also like the split bar, but when you click on something on the second bar, the top bar resets to HOME. IMO it needs to remember the setting. In my case, i always want FORUM. Also, the second bar seems longer than before, requiring more horizontal scrolling. Can the …

Member Avatar for MidiMagic
0
894
Member Avatar for Majestics
Member Avatar for jephthah
0
111
Member Avatar for Mel(plusplus)

We're not going to do your homework for you. You need to show us what you did and we can help you fix it.

Member Avatar for WaltP
0
84
Member Avatar for Narue

[QUOTE=Narue;368053]But there's no requirement that the size of a long be related to the size of an int provided that both meet the minimum size requirements.[/QUOTE] Which kinda sucks when you want [I]long[/I]s to be longer than [I]int[/I]s :icon_wink:

Member Avatar for ivailosp
1
680
Member Avatar for DoctorBob

#1) Learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so it's readable #2) Isn't [B]y[/B] a single character? What's the proper [ICODE]printf()[/ICODE] format specifier for a character? That should help.

Member Avatar for WaltP
0
112
Member Avatar for alsoumhi

You're talking about [I]command line[/I] parameters. [B]Narue[/B] is correct. You can check out [url=http://www.gidnetwork.com/b-45.html]this information[/url] on how to use the command line.

Member Avatar for Narue
0
287
Member Avatar for The Dude

I was at the infamous concert where he got down on one knee to start Hound Dog, and said :I think I just ripped my pants!" He sang 3 songs, then called the Gospel group on stage while he changed. That was the second concert I saw.

Member Avatar for jwenting
0
67
Member Avatar for fallen_prisoner

You cannot compare strings with the == operator. Look up the function [icode]strcmp()[/icode]

Member Avatar for Ancient Dragon
0
115
Member Avatar for Ints

Use one of these compilers: [url=http://bdn.borland.com/article/21751]Turbo 1.01[/url] [url=http://bdn.borland.com/article/20841]Turbo 2.01[/url] [url=http://148.231.149.200/aplic/tc30.zip]Turbo 3.0[/url]

Member Avatar for jephthah
0
133
Member Avatar for ElectorCount

[QUOTE=dougy83;570051]The problem's in your code; without seeing your code it's a bit hard to see where the problem is...[/quote] No it's not. Almost every error is [icode]... error C2664: 'carddeck' : cannot convert parameter 1 from 'int' to 'int []'[/icode] You are passing an [I]integer[/I] in parameter 1 of [B]carddeck[/B] …

Member Avatar for VernonDozier
0
337
Member Avatar for Drake
Member Avatar for sDJh
0
106
Member Avatar for pete212

[QUOTE=Nessie;571974]Entirely your choice, but I would use a while loop. I would also use recursion (i.e. your function should call itself within the loop), as you'll need to print out the columns in reverse order to how they're calculated.[/QUOTE] I wouldn't. I'd just write the loop properly.

Member Avatar for WaltP
0
150
Member Avatar for vardhani

[QUOTE=vardhani;570003]I want to know a small c code to generate random numbers.It could be within a certain range. I want to know if rand() function will generate a random number[/QUOTE] Yes, [icode]rand()[/icode] will generate a random number. Also, look up the [icode]srand()[/icode] function which you will also need. Then search …

Member Avatar for jephthah
0
132
Member Avatar for dark7angelx07

[QUOTE=terminator0031;569164][B]THE ULTIMATE SOLUTION IS THIS[/B][/QUOTE] Only if you can't program... :icon_rolleyes:

Member Avatar for DavidB
0
1K
Member Avatar for g_loughnan

[QUOTE=g_loughnan;569733]So if I write:[/quote] No [icode]estimate(data, n, m, &xms,d);[/icode] [B]data[/B], [B]n[/B], [B]m[/B], [B]d[/B] have no value [icode]for (i=0;i<m;i++)[/icode] [B]m[/B] has no value [icode]printf("\n%f, d[i]");[/icode] Improper syntax. Try [icode]printf("\n%f", d[i]);[/icode] instead.

Member Avatar for g_loughnan
0
137
Member Avatar for kpnprakash

Copy the file where ever you want, as [B]jephthah[/B] suggests. In the code, use the full path to the file.

Member Avatar for WaltP
0
74
Member Avatar for mzdiva041986

Yes, as [B]Traicey[/B] implied, learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. Most of the errors you would have found without asking. [ICODE]F:\C ++ Numerical Methods\Newton_Raphson.cpp(183) : error C2043: illegal break[/ICODE] -- a [B]break[/B] must be within a loop or switch [ICODE]F:\C ++ Numerical Methods\Newton_Raphson.cpp(184) : warning C4508: 'main' : function should return …

Member Avatar for WaltP
0
142
Member Avatar for jimJohnson

[QUOTE=jimJohnson;569119]tried that and still getting some errors..... c:\documents and settings\don & diane kruep\desktop\project 04\p04.cpp(28) : error C2664: 'Get_Name_and_Num_Classes' : cannot convert parameter 1 from 'int' to 'std::string &' 1>[/quote] The function [ICODE]Get_Name_and_Num_Classes[/ICODE] has the first parameter defined as a [I]string[/I], you are passing an [I]int[/I] instead.

Member Avatar for vmanes
0
251
Member Avatar for mikky05v

What are you trying to accomplish with this statement? [icode]if (month=12, month<=3)[/icode]

Member Avatar for mikky05v
0
127
Member Avatar for linux

IMAO Flash ads should be banned. They are annoying resource hogs. And Flash sites too. Flash should be used to enhance a site, not [I]be[/I] the site.

Member Avatar for MidiMagic
0
404
Member Avatar for Spring_1000

When you press ENTER all by itself, where does it go? What does it look like? That's what you put in place of [B]???[/B].

Member Avatar for Spring_1000
0
250
Member Avatar for ccrdude03

You need to make a decision on how to input a move. Once you make that decision, make another function to accept moves.

Member Avatar for WaltP
0
82
Member Avatar for knight fyre

[B]jephthah[/B], "[I]try to keep code basic and readable for the next guy, rather than using clever logical constructions[/I]" is very good advice. But then using [icode]if (!strcmp(progress,"YES") || !strcmp(progress,"NO"))[/icode] is not easily understandable. It assumes you understand that [icode]strcmp()[/icode] returns FALSE on equality, which is illogical. Better to use [icode]if …

Member Avatar for jephthah
0
128
Member Avatar for charlez40

In order to input the data, you must open the file first. Then you need to read each record and load your structure. Maybe you should read the entire file when you start the program and just keep all the records in memory so you have access to them at …

Member Avatar for Rajith Cherian
0
113
Member Avatar for farag

So you get that far and quit? And we get to finish it for you, and we have no idea what's not working? Somehow I don't think I need an A that bad.

Member Avatar for WaltP
0
152
Member Avatar for majestic0110

[QUOTE=cscgal;564976]Creating a unified rating system does make sense, but it would take awhile to code, so is more likely something a month or so down the line. There are a couple of things that I want to accomplish first, such as adding a 'Flag Bad Post' link to the blogs …

Member Avatar for majestic0110
0
117
Member Avatar for bhoot_jb

[QUOTE=Ancient Dragon;565443]If you don't believe me, then what can I say except for you to read your textbook about pointers. One of our members WaltP has a very good signature or something like that.[/QUOTE] It's actually [B]Salem[/B]: [QUOTE]If you dance barefoot on the broken glass of undefined behaviour, you've got …

Member Avatar for WaltP
0
105
Member Avatar for lasher511

[QUOTE=cscgal;331594]Being the age that I am, and first getting into Star Trek while in college a couple of years ago, the original series is just too corny.[/QUOTE] Maybe by today's standards, but when it first hit the airwaves, man it was the greatest! I like both Kirk and Picard but …

Member Avatar for Ancient Dragon
0
155
Member Avatar for scorpio40330

[QUOTE=Daphene;564997]Hey did anyone ever reply to you?[/QUOTE] Can't you tell by the posts in this thread?

Member Avatar for Daphene
0
118
Member Avatar for kartouss

[QUOTE=FireNet;545082]P.S Refer to my reply to your mail.[/QUOTE] [QUOTE=vmanes;545090]As I'd said privately....[/QUOTE] No one should be answering private requests for help. That's because no one should be [I]asking[/I] for private help. Help is what these forums are for. Keep all questions and answers in the forums, please. [QUOTE=vmanes;545193]Not disputing what …

Member Avatar for kartouss
0
549
Member Avatar for severman

[QUOTE=severman;563587]could any 1 tell me why this code isnt working right?? two.txt is not wriiten good... [/QUOTE] Because it's written poorly? It's [I]your[/I] job to tell us 1) what the program is supposed to do 2) what exactly goes wrong 3) why it's wrong 4) what is supposed to happen …

Member Avatar for Aia
0
109
Member Avatar for smrhab

What you need, in addition to learning how to use [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]CODE tags[/url], is two loops. Loop 1 is for each game. Inside that loop is loop 2 for each guess. You are using one loop for guessing and winning which is very difficult to handle. The first thing in the …

Member Avatar for WaltP
0
136
Member Avatar for technogeek_42

[QUOTE=technogeek_42;556942]owh i get it but hwo about in million can u make me some codes of that like this [/QUOTE] Can't you write ANY code at all? Do we all need to do your homework for you? [QUOTE=Necrolis;557018]This is lazyness, but i have nothing to do atm so.... [/quote] "... …

Member Avatar for technogeek_42
0
723

The End.