506 Posted Topics
Re: >> I want to take double numbers from user but I want to make it float number on the output........ If this is what you wanna do I think AD has given teh solution.. If not you need to simplify your question a li'l further.. :) | |
Re: Interesting.. I don't know the answer to your question. In Java though you have a way to get a handle to the Input and Output streams of a child process you've forked.. So I'm sure it would be possible in C as well.. will check.. Do post the answer if … | |
Re: You haven't posted the code that's causing this error.. Post the XXX.cpp if your error message says first defined in XXX.o.. Of course first check if you havn't #included ItemType.cpp.. | |
Re: Don't forget to check for negative part.. You'll need to change the return type probably or throw an exception, if you already know how to.. | |
Re: You need to pickup some data structures book.. See [URL="http://en.wikipedia.org/wiki/Postfix_notation"]this link[/URL] and don't say what's the use of this forum, it's useful alright.. | |
Re: Seems like you're trying to do something wrong. :) If you want contiguous chunk of memory you can just declare an array of appropriate size and it's guaranteed that it's continuous. But I suppose your problem is variable[COLOR=Red][B]s[/B][/COLOR] and not just one variable. Well I donno whether you can do … | |
Re: [quote=rahulmenonr;338061] Thread.sleep(3000); [/quote] Using waitFor() would be a better idea.. [code]prcs.waitFor();[/code] [B]@kaushalsahil09[/B] - Some more description of error than "I had tried this one but it does`t work" would help. | |
Re: That is because when you ask JRE to run your program, it loads the class and tries to call main(). Understandably it doesn't find one and gives the error. Solution: Define main() | |
Re: Go to [url]www.google.com[/url] and type "Java Tutorial" in the search box, press enter. Now you'll see lotsa links, just click on the first one you like and get going.. I'm sure you understand no one can type something here in this thread that will [B]teach[/B] you java.. | |
| |
Re: 1. Don't print a character if it's already printed. This you figure out using an extra array/vectory/... 2. While counting use a map of character vs count. Map will ensure there is only one entry for a given key. | |
Re: As you need to trap a single key, I don't think you can use getline/s(). Just catch every character typed using getchar/ch() and echo it back using putxx() if it's not the tab char. | |
Re: Error you get is: "IOException returned is: (The filename, directory name, or volume label syntax is incorrect)" Did you check if you're giving the path correctly? May be it's some simple bug like using "/" instead of "\" (/ is for Linux/Unix and \ for windows as you know) | |
Re: [quote=ram maradola;338298][B]hi frinds this is ram, the following program is my problem, i don't know how to do this program plz help me[/B][/quote] That's what we're here for.. [quote=ram maradola;338298]create a GUI solution that displays a collection of some sort. [/quote] This is easy, just goto [URL="http://www.thecollection.com/"]TheCollection[/URL] and you'll find … | |
| |
Re: I donno. But did you mean DSN or DNS ?? Hope you're not looking for wrong thing.. :) All the best.. | |
Re: There is nothing wrong with your code except "[inlinecode]class PizzaFactory: public Pizza{[/inlinecode]". You don't need to derive factory class from base class. Although this would not cause any fatal problems. Post your main and the some more description of the problem. | |
Re: [quote=Infarction;337424] [code]$ g++ blah.cpp && ./a.out 2 0x0C Testfile: [ test.fil] user: [juser ] Trial 23.80 2 0x0C Testfile: [ test.fil] user: [juser ] Trial 23.80[/code][/quote] Nice one.. :) I also prefer printf() when it comes to formatting.. | |
Re: STFW [URL="http://en.wikipedia.org/wiki/Inner_class"]Here is what I found for you[/URL] | |
Re: Sounds more like a bug in the application rather than a general situation/error (faced by many/socket API error). Check if this happened when a particular type of msg was sent by client (or server). >> Suddenly, the server started dumping the messages towards client. My guess would be that server … | |
Re: Error: Assuming you refer to error codes, these would be errors given to caller of a function via return types. Checked Exception: Exceptions that are checked by compiler at compile time are the checked exceptions. Means if you are not handling a checked exception of a method you call, compiler … | |
Re: From what I know j2ee.jar is the one that contains these classes. Can you run echo %CLASSPATH% in the same cmd window where you are able to reproduce the error and see it? Also see [URL="http://forum.java.sun.com/thread.jspa?threadID=582242&messageID=2965329"]this thread[/URL] if it helps.. J2EE_HOME should point to the home dir (i.e. C:\j2sdkee1.3\) not … | |
Re: >> the first error message highlighted in green says i need to return a value instead of what i have written down. Yeah, when you promise something ([B]void [/B]findmaxLocation() ) and then break your promise ([inlinecode]return maxlocation;[/inlinecode]) compiler has gotta give you an error. >> and the line highlighted in … | |
Re: int counter[100] = {0}; >> Just curious, is it guaranteed that this will [U]always[/U] initialize elements indexed 1 to 99 with 0 ? [quote=ft3ssgeek;336716]IMHO...it would be easier just to do it the way you're already doing...get the list filled, then sort it...think of it this way, you spend the time … | |
Re: It surely is UNICODE problem like Salem mentioned, search msdn.microsoft.com to find out how to write UNICODE compatible programs and what are the relevant project settings. You'll learn how to change your project settings AND how to change the code if you don't want it UNICODE compat.. From what I … | |
Re: If you can convert using a pen and paper, you should be able to write down a small algorithm. Start from there.. If you donno how to convert binary to decimal itself, you need to read that some place else.. | |
Hello *, I was writing an assert() stmt when I realized the following (see code). Can anyone explain why/how. My final aim is to be able to write an assert stmt for verifying that my function (a demo function) works fine. I heard from someone that there are special assert-macros/comparision-operators … | |
Re: Length of the string you pass down the recusive call chain won't change (should not change). What [U]should[/U] change is "what is changing in your for loop in iterative model" viz. index of character on which you're working. So pass the index of character on which the function is supposed … ![]() | |
Re: [quote=WolfPack;336397][code] char *key; key[0] = 'a'; key[1] = '\0'; [/code]This should give you a segmentation fault. [/quote] Or even worse, it won't give you a SEGV in debug and when you release it does.. ! | |
Re: A few comments: 1. You're never using "p". 2. you don't have a loop to read till the end of file. Lookup the code snippets, I'm sure somewhere you'll find some code that reads from a file. | |
Re: >> As you are no doubt familiar, if [B]you[/B] are in the middle of typing something and the [B]program[/B] sends something to System.out, it will just put it right on top of where you were typing Usually "you" an "program" are one and the same. Program doesn't send anything by … | |
Re: >>What exactly is the difference? Apart from reading up on the material given by AD above, just one note, remember that that "*" in somefunc([B]*[/B]word) is an operator. So try and figure out what the * operator does. The other operator of interest is "&" which does exactly the opposite … | |
Re: Nice one. Here is the one with quotes.. [code=c++] #include <nonsense.h> #include <lies.h> #include <spyware.h> /* Microsoft Network Connectivity library */ #include <process.h> /* For the court of law */ #define say(x) lie(x) #define computeruser ALL_WANT_TO_BUY_OUR_BUGWARE #define soon next_year #define the_product_is_ready_to_ship another_beta_version int main() { if (latest_window_version>one_month_old) { if (there_are_still_bugs) … | |
Re: Seems like you've declared the variable like this: itemp=0; If that's the case it's wrong and it should be something like: int itemp ; If that's not the case please post the exact declaration of this variable from link.h | |
Re: You don't optimize wrong code.. You correct it.. Why would anyone do x= y * 0; if they want to set x to 0 ?! | |
Re: [quote=Ancient Dragon;335598]any conditional statement that is either true or false. for example if you were asked to enter either 'Y' or 'N' (Yes or No) then the statement might read [code] if( answer == 'Y') { // true statement } else { // false statement } [/code][/quote] Thisnk it's a … | |
Re: Is your code in C++? Sounds like JavaScript | |
Re: Have already written the code for communication between 2 applets? If yes, post the code and the error you're getting.. | |
Re: [quote=WolfPack;335667]the word YOU replaced with I.[/quote] He he that's a nice one.. :) | |
Re: I don't think you need to change anything in the code. Or in other words, I don't think you can change your code and make it work. It should be a matter of configuration of the printer. (which I have no clue). ![]() | |
Re: There is a small problem in teh way you've used structure and arrays concepts. Better way of doing this would be to have a struct with 3 members and then use an array of struct. (instead of having arrays as members of the struct) Like this: [code=c]struct Tender { int … | |
Re: [quote=anju114;334831]I don't have Pet.java but I have Pet.class will that help.[/quote] Yeah, that will solve the problem if it's the correct .class file. Put this .class file in the directory where you have Main.java and compile again. (idea is to put Pet.class file in a directory that's part of CLASSPATH … | |
Re: Do you wanna convert a given epoch time to a string? | |
Re: I feel you've got something mixed up in copying these 2 lines [code=c] #define FLAG_CDR 0*01 #define FLAG_MSR 0*01 [/code] they should probably look somethig like: [code=c] #define FLAG_CDR 0x01 #define FLAG_MSR 0x01 [/code] This defines both flags to be same. Anyway, just [URL="http://en.wikipedia.org/wiki/Bitwise_operation"]lookup the articles[/URL] on bitwise operators and … | |
Re: [B]>> The balance is never decreased by the amount of each montly payment.[/B] That's because you have not written any code/statement that decreases the variable "double balance". :) My guess is you need to change as I've done (Look for "CHANGED") [code=C++] int main () { // defines varibles double … | |
| |
Re: I'm unable to view the attachment, problem with my firewall. Seems like you wanna do 2 things: 1. Print teh counter 2. Accept user input. If you wanna do both in parallel, use multi-threading. In this case it would be simple. - [B]fork()[/B] a child thread from the main thread. … | |
Re: If you're using VC++, you need to associate a variable with the editbox that contains the path. From parent you should be doing: [code=C++] YourDialogClass obj ; obj.doModal() ; //or something like that //Prev call returns when user has selected the path and pressed Ok/Cancel. //Also in the onOk() of … | |
Re: Think you'll have to attach complete code (including that of Player, Brick etc classes). From teh code you've posted all looks well. PS: Please do ATTACH and not paste the whole code here. | |
Re: [code=C]// Functions proto-type void mainMenu(); void memoryTester(int *array); int* addNumber(int *array,int arraysize,int var); int* eraseNumber(int *array,int arraysize,int var); void printfArray(int *array,int arraysize); // Main function int main() { int *array = NULL; int arraysize = 0; int var = 0; int choice; // Main loop while (choice != 4) { … |
The End.