2,827 Posted Topics

Member Avatar for serkan sendur

"What I don't like about (insert ethnic group here) is (insert reason here)." No matter what you put in the blanks, people are going to have a negative reaction and it's going to detract from whatever point you are trying to make, so if you actually HAVE a point and …

Member Avatar for ~s.o.s~
0
383
Member Avatar for Divinginthesky

I imagine that the answer to the OP's question is what Ancient Dragon somehow accidentally posted in post 1: [quote] Hello Why not compile with DevC++ and then just run the exe file? To run the file in cmd, just go to the directory where it's located and type the …

Member Avatar for zautner
0
106
Member Avatar for _dragonwolf_

Well, yes, it is full of errors, and keep in mind that sometimes when something is full of errors, the part you are having a hard time with may NOT be the error. The function you are worried about seems fine to me save for one thing: [code] string Date::convertMonthNumberToString(int …

Member Avatar for _dragonwolf_
0
166
Member Avatar for kentigens

You have a j variable declared in line 6 and a j variable declared in line 24. These have different scopes. Be very careful with this. You are also passing j to functions outside of what is posted. Check to make sure j isn't passed by reference and that the …

Member Avatar for VernonDozier
1
279
Member Avatar for DIDL

[QUOTE=DIDL;928867]but there is for 3D, but i want for begin in 2D, can someone give me something were i can learn or work easy with it....?[/QUOTE] Vague questions are likely going to give you answers that don't fit what you want because people don't KNOW what you want. You need …

Member Avatar for JameB
0
73
Member Avatar for beshoyatef

Please include all import statements with the posted code so we don't have to add them ourselves. I see no call to this function: [code] public void actionButtons() { for (int i = 0; i < buttonsName.length; ++i) { paintButtons[i].addActionListener(this); } [/code] No Action Listeners are ever added to the …

Member Avatar for JamesCherrill
0
128
Member Avatar for _dragonwolf_

[QUOTE=_dragonwolf_;922942]I have tried different things to modify the following code and have been unsuccessful. The following code is to get the julian date number. I need to alter it to make it return the day number (between 1 - 366) within a given year. Can anybody help? (fyi - this …

Member Avatar for _dragonwolf_
0
245
Member Avatar for pltndragon

Function call must match the function declaration. Your function takes two parameters: [code] void arrSelectSort(double*, int); [/code] so you need to give it a double* and an integer when you call it on line 84 (line 4 in most recent post): [code] arrSelectSort(array, size); [/code] Leave off the [ICODE]double*[/ICODE] and …

Member Avatar for pltndragon
0
3K
Member Avatar for bigbadbag33

// payroll program upgrade import java.util.Scanner; // program uses scanner public class payroll5 { public static void main(String args[]) { Scanner input = new Scanner(System.in); String nameOfEmployee; double rateOfPay; rateOfPay = 0; double hours; double sum; System.out.println("Please enter name of employee or stop to quit: "); nameOfEmployee = input.nextLine(); while …

Member Avatar for bigbadbag33
0
106
Member Avatar for phillipeharris

I'm getting a "Debug assertion failed" error in Visual Studio in the loop in lines 79 and 80. Note: I had to change the code in line 42 from "Contributor.h" to "contributor.h" to match the filename. [code=cplusplus] //*************************************************************** // TITLE: Contributor // FILEInContrib: Contributor.cpp // PREPARED FOR: CS230 Section <section …

Member Avatar for brian4092004
0
125
Member Avatar for maestermoo

[code=cplusplus] int flipLocation(int numberUsed) { cout << "Enter flip location "; cin >> flipLocation; if (flipLocation > numberUsed) cout << "Invalid flip location"; cout << "Enter a new flip location "; cin >> flipLocation; return flipLocation; }[/code] I see lines 6 through 8 are indented. I assume that means they …

Member Avatar for VernonDozier
1
77
Member Avatar for xiikryssiix

Bubble sort is the simplest sort algorithm out there. Google "bubble sort", "bubble sort c++", "bubble sort c++ sample code", stuff like that, and you'll get plenty of sample code, all based on arrays. Here's a bunch of applets I made myself explaining the different sorts. I really need to …

Member Avatar for xiikryssiix
0
194
Member Avatar for avaitla

I don't see where you're doing any conversion. You say you're converting to decimal. Is there an integer variable that holds the decimal? you have temp, but I assume that's just a temporary variable. What holds the final decimal value? I also don't see any initialization of the bitset that …

Member Avatar for tux4life
0
141
Member Avatar for Dragonfyre

I think I see the logic, but I'm not 100% sure. I see no reason why you are not placing the [ICODE]i++ [/ICODE] in your outer loop or why you would want it inside your inner loop. Your job, it seems to me, is to go through chrs[] a character …

Member Avatar for Dragonfyre
0
128
Member Avatar for tazboy

You should post a short, complete program, including the array display function, the read_list function, and the main function that calls both. Throw in some comments describing the variables and what they represent. There could well be a problem in calling or displaying the array rather than a problem with …

Member Avatar for VernonDozier
0
98
Member Avatar for lotrsimp12345

[code] void line_test::isvalidname(ifstream& input,ofstream& output) { if(input>>first_name>>ws>>last_name) { output<<"name "<<inputline2<<"\n";//"name "<<inputline2<<"\n"; } else if(input>>idnumber) { output<<"id "<<inputline2<<"\n";//"id "<<inputline2<<"\n"; } else if(input>>gpa) { output<<"gpa "<<input<<inputline2;//"gpa "<<inputline2<<"\n"; } else if(input>>gender) { output<<"gender "<<inputline2<<"\n";//"gender "<<inputline2<<"\n"; } else { output<<"none"<<"\n"; } } [/code] Don't know what you are trying to do here, but I …

Member Avatar for Dave Sinkula
0
108
Member Avatar for mustafaneguib

[quote] hi all, this is my first time using JAVA. i know other programming languages, such as, c++, PHP, Assembly. [/quote] This is your first time using Java and you're writing a 1500 line program? What happened to starting with "Hello World"? It's an awful lot of code to work …

Member Avatar for mustafaneguib
0
166
Member Avatar for cougarclaws

[code=cplusplus] //This finstion will round value from calculated line 6 //and will return a number rounded to nearest multiple of 1000 double round(double calcTotStat)// parameters for function { double roundCalc; calcTotStat += .5; roundCalc = (int) (calcTotStat / 1000); roundCalc * 1000; return (roundCalc); // return to main } [/code] …

Member Avatar for cougarclaws
0
4K
Member Avatar for Orusaka

Close on the code tags. Here's how to do it: [code] paste code here [/code] You need a loop to check each element of the array individually. #include <iostream> using namespace std; int main() { int board[3][3] = {0,0,0,0,0,0,0,0,0}; // check if board is all zeroes bool allZeroes = true; …

Member Avatar for VernonDozier
0
83
Member Avatar for aveek

[QUOTE=aveek;922808]i am trying to draw an arrowhead at the mid point of a line. say the point is (x,y). can anyone tell me how to do this. the line could be curved. it should also point toward either of the end points[/QUOTE] "Arrow" or "arrowhead"? This sounds like a contradiction. …

Member Avatar for VernonDozier
0
73
Member Avatar for debasishbasak

[QUOTE=debasishbasak;922805]pls help me to convert 2 dimensional array into 1 dimensional in c++ code[/QUOTE] You don't need two threads for the same question. Close one of them. This is a fairly easy task, but you need to post an attempt first, even if it is incorrect. At least post some …

Member Avatar for csurfer
0
125
Member Avatar for loozax

[QUOTE=loozax;921976]can some1 help me wid diz?! [code]import java.io.*; public class looping1{ public static void main(String args[])throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader (System.in)); int value = 1; for (int i = 1; i<=11;i++ ){ System.out.println(value); value = i + value;} }} [/code] the output should be: 1 2 4 …

Member Avatar for JamesCherrill
0
113
Member Avatar for jvd401

This is a cut and paste of the assignment specification. What is the question? [url]http://www.daniweb.com/forums/announcement9-2.html[/url]

Member Avatar for jvd401
0
10K
Member Avatar for chiotti

Close on the code tags: [code=JAVA] paste code here [/code] import java.io.*; import java.util.*; public class GraphPath { static BufferedReader input; static PrintWriter output; private static int numNodes; private static int matrix[][]; public static boolean deBug = true; public static boolean deBug2 = false; public static void main(String [] args) …

Member Avatar for masijade
0
2K
Member Avatar for thr

[QUOTE=thr;920187]please help me[/QUOTE] He IS helping you. He's asking you questions in an attempt to clarify your goals. Depending on your answers to those questions, he'll offer different advice. Often, if you answer these questions, not only will the problem be clearer to him (and the rest of us), but …

Member Avatar for thr
0
101
Member Avatar for Rockpile

You're asking two questions when one question will suffice, so I would say it's overkill. Ask either of these: [quote] Input largest value to square : [/quote] or [quote] Input largest squared value : [/quote] but not both because one derives from the other. Frankly I think the first question …

Member Avatar for Rockpile
0
178
Member Avatar for hhprado

We can help, but we won't do it all for you. You need to also put your pattern in code tags so the spacing isn't stripped out. Otherwise, we can't tell what the pattern is supposed to be: [code] paste pattern here [/code]

Member Avatar for hhprado
0
164
Member Avatar for thr

[QUOTE=thr;920131]i want to select java or c# please help me to select better programming language and easy to programming language i have experience in c++ if java is better please tell me why java is better or c# please introduce me best books for java and c#[/QUOTE] You're in the …

Member Avatar for Ramy Mahrous
0
237
Member Avatar for whiteyoh

[QUOTE=whiteyoh;895901]Thanks for the replies. Interesting to know theres still more than 1 way to skin a cat. Im using netbeans. im after an example of something that gives me an understanding of how clicking a button interacts with an access database to add,edit,delete a record and outputs everything to a …

Member Avatar for oliver_lundag
0
197
Member Avatar for VernonDozier

I posted a program earlier today in response to another thread and noticed that I had forgotten to clean up/free the memory I used. Here's the program. [code=cplusplus] #include <iostream> using namespace std; int main() { int LIST_SIZE, NUM_CHARS_PER_ELEMENT; cout << "Enter number of elements in list: "; cin >> …

Member Avatar for wildgoose
0
188
Member Avatar for tazboy

[QUOTE=tazboy;919967]Without vectors, I need it to be a dynamic array using new. So would it be: [ICODE]char **list = new char[LIST_SIZE];[/ICODE] or [ICODE]char **list = new *char[LIST_SIZE];[/ICODE] If this is true then I would need to have my function return [ICODE]char **read_line[/ICODE] , correct?[/QUOTE] Is list type char* or type …

Member Avatar for VernonDozier
0
213
Member Avatar for masterjiraya

[QUOTE=masterjiraya;919980][CODE=JAVA]// This is the Debts program in Java import java.io.*; class Debts { public static void main(String[] args) throws IOException{ BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); String Amount, Payable, Interest, Paid; double Value, Rate, Spent; int Years; System.out.print("Enter Amount: "); Amount=stdin.readLine(); Value=Double.parseDouble(Amount); System.out.print("Enter Payable in years: "); Payable=stdin.readLine(); Years=Integer.parseInt(Payable); System.out.print("Enter Intrest Rate: …

Member Avatar for masterjiraya
0
143
Member Avatar for applefat

I've had numerous problems with repaint () and they used to drive me nuts. I won't claim to understand the ins and outs, but I've gotten better. They have tended, for me at least, to boil down to my not using threading properly. Here is a thread that I started …

Member Avatar for VernonDozier
0
113
Member Avatar for loozax

[QUOTE=loozax;918947]im just new here..and i really need some1 who can help me do our exercises..its about java(using looping/iteration)..i know others in java but not yet 'bout looping..[/QUOTE] You aren't getting help because you aren't showing effort yet. It's the policy on this forum (and just about all forums) that posters …

Member Avatar for oliver_lundag
0
249
Member Avatar for anthutton

Well we can't run the code since it refers to other things. Your goal is to catch and handle problems in the way you want. It's catching things correctly (not letting bad input go by the point where you think the bad input is), but it's not handling it the …

Member Avatar for anthutton
0
155
Member Avatar for smithss

I tried my hand commenting on this thread earlier, but after reading my own post, I decided that my comments just made things more confusing, so I didn't post. So my contribution to this thread will be to link a previous thread that I started when I wanted to get …

Member Avatar for VernonDozier
1
139
Member Avatar for sdmahapatra

Wherever you need to set aside memory and you have no idea how much memory you'll need at compile time, you'll probably need a "new" command. Whenever you have a "new" command, you'll need a "delete" command somewhere. A decent rule of thumb, but definitely only a rule of thumb …

Member Avatar for csurfer
0
228
Member Avatar for MonicaClare

As I mentioned in your last thread, you need to define what an "invalid" answer is and what a "valid" answer is. It looks like you have decided to use regular expressions to do this, which is a good idea, but again, you and only you can decide what's "valid" …

Member Avatar for masijade
0
151
Member Avatar for akulkarni

[QUOTE=akulkarni;916718]i am not getting the desired output(the contents in a text file which i have saved in the jdk bin here is my code i got. Also what is return in the try catch block i wanna know. it says file not found [code] import java.io.*; class FileDemo { public …

Member Avatar for akulkarni
0
264
Member Avatar for kg4cxl

Function call: [code] temp.getstockNumber(j -1); [/code] Function: [code] public int getstockNumber() [/code] Function doesn't take a parameter. Function call provides a parameter. That doesn't match. Try changing the call to: [code] temp.getstockNumber(); [/code] All these errors appear to be the same. You have a bunch of functions that don't take …

Member Avatar for di2daer
0
194
Member Avatar for apease11

I assume you are referring to line 18. It should evaluate true if [ICODE]file[/ICODE] is "somefile.tar", false if it is "somefile.txt"? Since no one is going to enter "*.tar", '*' is not meant to be a literal character. Perhaps check if ".tar" occurs in [ICODE]file[/ICODE] using [ICODE]strstr[/ICODE] from the cstring …

Member Avatar for apease11
0
173
Member Avatar for BestJewSinceJC

[QUOTE=BestJewSinceJC;914214]After a little research I discovered some Calendar methods that were pretty nice. [CODE=Java]Date date = new Date(); int daysSinceSeen = - ( rand.nextInt() % 365 ); Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.add(Calendar.DATE, daysSinceSeen);[/CODE] How could this code be returning a date in 2010? Do I have a bug that …

Member Avatar for BestJewSinceJC
0
106
Member Avatar for AirGear

[QUOTE=AirGear;914245]can we compile b.cpp by running a.cpp? i have koolplot project to draw plot. this plot should appear in the middle of the program, and if the plot is closed, the whole program terminates immadiately. To avoid that, i tried to make 2 cpp files. One for the main, and …

Member Avatar for AirGear
0
420
Member Avatar for funjoke88

[QUOTE=funjoke88;914781]when is the recursion information ?i didnt see it .u know how to do[/QUOTE] He has two posts linking each other. You keep clicking on them and you keep going back to where you started. It's an infinite loop. If M.C. Escher was alive, he'd paint hundreds of monks mindlessly …

Member Avatar for NathanOliver
0
470
Member Avatar for JohnPhilipps

[QUOTE=JohnPhilipps;915125]Good evening, I have the need to learn how to make a picture jigsaw with java. I have been looking for hours on the web for some kind of tutorial, source code example, something anything and I haven't been successfull in finding something I could work with. Would somebody have …

Member Avatar for JohnPhilipps
0
545
Member Avatar for rizillion

[QUOTE=rizillion;914278]the problem is that I need to open this tab from another form. [/QUOTE] I don't know why that would be a problem. If you are able to see the JTabbedPane, and it sounds like you can, can't you do this in your ActionListener? [code] tx.setSelectedIndex(1); [/code] Maybe I'm not …

Member Avatar for llemes4011
0
2K
Member Avatar for catchmrbharath

You're doing factorials or you're factoring? I'm seeing you use the modulus operator on 10, which suggests you're trying to isolate digits? 200! is way too big for an integer, so I assume you're doing something with arrays to bump up your storage or something, and doing manual multiplication through …

Member Avatar for siddhant3s
0
102
Member Avatar for che_che

Code tags: [code] paste code here [/code] You have no newlines, so everything will be on one line. Is a trapezoid all on one line? No, so you need newlines in there. And do you have enough information to draw a trapezoid? You ask for one dimension. Look at the …

Member Avatar for Hiroshe
0
151
Member Avatar for aveek

[QUOTE=aveek;913065]im trying to draw a curved line using mouse. there are three points on a straight line. a starting point, an ending point and a point in between. i want to draw a curved line by dragging the middle point in any direction. the other two points remain constant.[/QUOTE] Three …

Member Avatar for VernonDozier
0
94
Member Avatar for the_prox

If you specify a LayoutManager for panel, your clock drawing will become visible. Below, GridLayout is specified. It's not a good choice for you (BorderLayout would be better, I think), but your clock is at least visible. You'll need to add an import for GridLayout at the top. [code] /** …

Member Avatar for VernonDozier
1
176

The End.