2,827 Posted Topics

Member Avatar for Lardmeister

[QUOTE=fierykido;621801][COLOR="Red"]some say[/COLOR] that in 2012 december 21 we are going to enter a new era call the golden age and [COLOR="Red"]other says[/COLOR] that a new sun cycle has already started and the sun storm will be too big and somehow kill us.thats by the NASA i think but [COLOR="Red"]yet another …

Member Avatar for sneekula
2
2K
Member Avatar for <M/>

To get back to the actual scientific answer, I believe Ene Uran had it right a while back. An evolutionist is going to say that the egg came first. > Evolutionists: > An almost chicken laid the egg the first real chicken came out off. > Creationists: > God made …

Member Avatar for <M/>
0
388
Member Avatar for ThatBitchYeah

* Stick a "return 0" in there at the end of main. * Count your opening and closing brackets. Make sure you don't have a bracket mismatch. * Get rid of the stray semicolon after the final bracket.

Member Avatar for veducator
0
442
Member Avatar for <M/>

You're a high school freshman and you can do a four minute mile? That should be a U.S. record for the 15 to 16 year old age group. http://www.usatf.org/statistics/records/view.asp?division=american&location=outdoor%20track%20%26%20field&age=youth&sport=TF Scroll down. Record for 1500 meters (shorter than a mile) is 3:54.02 in the 15 to 16 year old category. If …

Member Avatar for <M/>
0
181
Member Avatar for FtKShadow

[QUOTE=FtKShadow;694512]I am trying to get my homework assignment to work for class, but I cant seem to get it. Heres the assignment. Seems not to bad doesnt it? Well I have been working for a while and it still isnt working for me. I enter lets say a 4 it …

Member Avatar for StefanRafa0
0
3K
Member Avatar for brock.holman.7

> the program shouldnt display the previous numbers counted. Do I take this to mean that there should be no output? Or should there be a countdown from 30 to 0, with a delay in between each iteration, then there is a "Screen Clear" and the new number is displayed? …

Member Avatar for Gonbe
0
137
Member Avatar for Hayati_mahamad

Forget the computer for a bit. Think of the algorithm. How would you do it with pencil and paper? What steps would you take? Write the steps out exactly. Follow the steps exactly to make sure they are right for all scenarios. Now go back to the code and make …

Member Avatar for Hayati_mahamad
0
195
Member Avatar for np2100

[QUOTE=SpecialeW;529887]hi, how can i make sure that when i ask a yes no question, i don't get rubbish for an answer. i have tried some while codes, but i seem to do something wrong, because when i execute the program i can enter anything i want... this is what i …

Member Avatar for Gonbe
0
340
Member Avatar for kimika

I'm reading the function name. I see a function called **addBook**, not **addBoooks**. Hence I am expecting to one book, not many. I am hoping this is the intent. One book, not twenty. I am confused by your description of what is occurring. You are entering something 20 times, not …

Member Avatar for VernonDozier
0
206
Member Avatar for caierhui

Code tags: [noparse] [code=JAVA] // paste code here [/code] [/noparse] Code looks terrible without them. This looks like a cut and paste of the assignment specification that someone gave you. What seems to be the problem?

Member Avatar for love1969
0
208
Member Avatar for chocolatesky

This is a matter of going line by line and changing the code to C++. All variables in C++ must have a type (i.e. int, char, string, etc.) and must be declared before you use them, so a good start might be to figure out what variables you need and …

Member Avatar for chocolatesky
0
139
Member Avatar for Prysm[VA]

You have not posted the declaration of dna1, so it's hard to say exactly where you are going with this. Regardless, having the brackets operator without an array index seems like an error. if(!dna1[].strand1){ Does the compiler let you do this? Then later you have this... cout<<"<"<<sizeof(dna1.strand1)<<">";} Is dna1 an …

Member Avatar for Prysm[VA]
0
456
Member Avatar for joshmo

[QUOTE=joshmo;877835]Ofcourse I can get to understand the logic..What I want to know is how i can get, say a given equation to integrate or differentiate a number, then change that logic, to JAVA code..is there any application or tool that can do this?[/QUOTE] Depends on the equation. A lot of …

Member Avatar for JamesCherrill
1
1K
Member Avatar for bhavna04

You need the ruler to break the candle in two. If you have the ruler, then Dani's solution has it covered. All these solutions only need ONE candle, yet we have two of them. Is the second candle a red herring? I think we can assume we have matches. Not …

Member Avatar for Reverend Jim
-1
265
Member Avatar for darkeclipse8

Consider using the "at" function instead of the [] operator and catching the error. You have a 2 dimensional vector. You need to find out which one gives the error. For some debugging... cout << i << '\t' << j << '\t'; cin.get(); cout << grid.size() << '\t'; cin.get(); cout …

Member Avatar for NathanOliver
0
407
Member Avatar for nekoleon64

What exactly is the problem? Possibilities might include... * Reading from file. * Writing to file. * Iterating through the list. * Swapping elementss that are out of order. * Not understanding the bubble sort itself. I see no non-commented out attempt to do a bubble sort, so obviously things …

Member Avatar for VernonDozier
0
1K
Member Avatar for Alex_

[QUOTE=Alex_;889004] I know there is another thread about the same subject but it's been dead for years. And nobody pays attention because of the silliness of the poster.[/QUOTE] There are a couple of THOUSAND threads regarding project ideas and as a result, most get ignored or flamed. However, I won't …

Member Avatar for JamesCherrill
0
316
Member Avatar for savinki

[QUOTE=savinki;620158]Hi, wt is the function that can use to count number of digits in a long integer? e.g. 12345678 -> 8 11 ->2 456 -> 3 6724 -> 4[/QUOTE] I don't know that there is a function that does that. You can do two things though. You can use the …

Member Avatar for Shahzad Ahmad
0
320
Member Avatar for Ranger86

Line 43 seems way off. I'll take your word that this compiles and runs, but even so, line 43 is definitely wrong. I'm assuming that line 43 is supposed to be a function call. However, it is NOT a function call. Function calls don't have the return type and parameter …

Member Avatar for VernonDozier
0
320
Member Avatar for celina1234

> i have to copy and rename the output file in each step so that they can be used in another program . "Copy" AND "Rename"? So you start with a file named a.txt and you are supposed to end up with what? one file? Two files? A file named …

Member Avatar for Adak
0
304
Member Avatar for wids101

Use the iostream library to read in data from the file into a card type and card number. How best to do that will depend on how the information is arranged in the file. A common way to set up a file would be to have two fields per line, …

Member Avatar for VernonDozier
0
239
Member Avatar for ppotter3

[code] void CoinChanger::getCoinChange(int &DollarCoin, int &QuarterCoin, int &DimeCoin, int &NickelCoin, int &PennyCoin) { this->DollarCoin = DollarCoin; this->QuarterCoin = QuarterCoin; this->DimeCoin = DimeCoin; this->NickelCoin = NickelCoin; this->PennyCoin = PennyCoin; }[/code] This is a set function, not a get function. Either rename it or make it an actual get function. [code] void …

Member Avatar for magadascar
0
2K
Member Avatar for VernonDozier

Is there still a "noparse" option? I tried posting the following in the C forum (let's see if it works here). Error message is as below. > The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or …

Member Avatar for riahc3
0
333
Member Avatar for jongiambi

struct Card { const string rank[13] = {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; const string suit[4] = {"Spades", "Hearts", "Clubs", "Diamonds"}; }; These are string arrays. The only purpose of them is to provide a quick way of converting a number from 0 …

Member Avatar for jongiambi
0
192
Member Avatar for rithish

The || operator is the "logical or" operator. the | operator is the "bitwise OR" operator. The |= operator combines the bitwise OR operator and the assignment operator. Thus the code above is equivalent to the code below. #include <stdio.h> #include <stdlib.h> int main() { int a=8,b=3; int c = …

Member Avatar for VernonDozier
0
142
Member Avatar for sannidhikumar99

> is it possible to print both statements of else If you are using the if-else clause as intended, either the code in the "if" part will execute or the code in the "else" part will execute, but not both. Now if the question is "Can I print 'Hello World'" …

Member Avatar for shashikumar s g
1
637
Member Avatar for jongiambi

Quite a few questions in this thread. Not sure which ones are still relevant and which are already solved. First, from an overall design, there is more than one way to do this. There are two main ways and you have mentioned them both. One is to have the Card …

Member Avatar for VernonDozier
0
8K
Member Avatar for jongiambi

Who wrote the code here? Is this code you have been given or did you write it? I've never seen this style of doing things. I always did it more like this... struct Student { string name; int id; int* markPtr; Student(); }; Student::Student() { markPtr = new int [100]; …

Member Avatar for VernonDozier
0
350
Member Avatar for tahity1

I'm searching your code for the phrases "pop" and "push" and not finding them. You can't have a queue or a stack without "push" and "pop" functions. You probably have them in the code, but are calling them something different. I see "malloc" in the hireEmployee function, so my guess …

Member Avatar for VernonDozier
0
125
Member Avatar for phorce

> Why I can't create a new Cat I'm searching for the phrase "new Cat" and not seeing it, except in a comment. Also, capitalization counts. "Cat" and "cat" are not the same... sc1->method("Cat"); if(something == "cat") Not directly relating to your problem, but still needlessly complicating your code is …

Member Avatar for L7Sqr
0
227

The End.