- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 115
- Posts with Upvotes
- 98
- Upvoting Members
- 37
- Downvotes Received
- 19
- Posts with Downvotes
- 17
- Downvoting Members
- 12
Re: >i need code for scientific calculator in vc++ by using switch case statement So tell me what have you tried. Remember, we don't provide codes. We only help those who show efforts. Please try and then tell us on what part are you having problem. | |
Re: [URL="http://curl.haxx.se/"]cUR[/URL]L is the library which is used to do HTTP/FTP and similar protocols. There is a decent binding [URL="http://curl.netmirror.org/libcurl/cplusplus/"]cURLpp[/URL] for C++ which would be best for what you want. PS: C++ language as such do not have such functionality. | |
Re: One suggestion would be to build a html parsing program and then perhaps connect to [url]http://primes.utm.edu/lists/small/10000.txt[/url] and read out the list of primes into the memory and write them down to a file. Or you could choose[URL="http://www.numberempire.com/primenumbers.php"] this[/URL] website but the you'll need HTTP/POST feature to get the prime. PS: … | |
Re: Well, the therad is burnt now. The solution has been pointed by s.o.s ( sorry I am not putting those tildes). Tylor Theorm will come handy to you for all this 'magical' function. you could even calculate sin,cos,tan, etc etc. But this is not the correct way to learn programming. … | |
Re: I agree with Hemsworth. C++ is a programming language. You project do not require any programming backbone. You should also use a similar animation suite. If Adobe Flash is not affordable, you might look at Open Flash [url]http://www.osflash.org/[/url] Also, have a look at [url]http://www.openlaszlo.org/[/url] It is not good to use … | |
Re: If everyone is giving opinions, I would also cast my vote to GNU GCC If you are on a Linux, you probably already know about it. GNU g++ is the command line compiler. But there exists various IDE like Dev-C++ which uses GNU g++ as the compiler. I personally use … | |
Re: >>If I could write it, I wouldn't be asking for help. This doesn't work this way. Ancient Dragon wanted you to tell that you need to give more detail and the account of the effort you put in. Also, everyone is supposed to read the Sticky thread:[url]http://www.daniweb.com/forums/thread78223.html[/url] and also the … | |
Re: >>Then you can use stricmp() stricmp is not a standard function. | |
Re: Yes. Input the date as a std::string . Then use the[URL="http://www.cplusplus.com/reference/string/string/substr/"] substr[/URL] function to slice the string to get individual strings for Date, Month and year. Lastly you would want to convert the std::string to integer, Use stringstream to convert the string into the integer(refer [url]http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.2[/url]) | |
Re: >I wonder why some schools still insist on using Turbo when everyone in real life >know that it's a crappy-nonstandard-outdated compiler. >Can someone please explain? It is called the we-first-teach-students-basic-and-then-move-to-advanced-compiler philosophy but they often forgets that it is very hard for students to quite that crap. Or may be they … | |
Re: Do one thing: Go to the compiler and just try to comment out the line [icode]ifstream inFile; [/icode] Check if it runs or not. If it does, tell us. If it doesn't Try to comment-out [icode]#include <fstream>[/icode]. If it now runs, tell us. If it doesn't, there is some problem … | |
Re: >For integers, it will be just as accurate as the iterative or recursive version. Okay heres the bottom line: If you want to calculate the nth Fibonacci number, use the closed form(i.e. the formula mentioned in Post #3). If you want to print the series till some n, always use … | |
Re: >>Btw. in your for loop you don't have to test all the way to x. It is sufficient to test just to the square of x. He meant the square-root and not the square of x. ( must be a typo) To the OP, The suggestion of ddanbe is the … | |
Re: You may use third party library like libcURL([url]http://curl.haxx.se/libcurl/[/url]) which works well in fetching such webpage as strings. If you problem is solved, please mark the thread as solved so that others don't waste time on this problem. | |
Re: int is a very poor choice for a data representation of Date. The right thing would certainly be to accept the user input as string -- [I]as is[/I] and then parse it according to your needs. I would even go as to creating a struct for holding three short int … | |
Re: To the OP: When we (at least I) ask you to show up a code and we will try to fix it we say it in a spirit that a car mechanic would say ``Sir, I can't build a car for you, but if you have a defective car, I … | |
Re: The easiest way, which is in fact the more elegant way to do things would be to declare a struct or class of a [I]card[/I]. Create a vector of such 52 cards and use the standard library's [I]random_shuffle[/I]() [[url]http://www.cppreference.com/wiki/stl/algorithm/random_shuffle][/url] to shuffle it. | |
Re: >it's working but the code is very complex to me Do not know about the complex part, but the code is wrong, do not follow it. caut_baia, you were wrong in two ways: first, you tried to give the OP a direct answer which can spoil his fun of `getting' … | |
Re: I can't see where are you comparing a pointer and an int. In the loop condition, msg[size] is a char and i is an integer. Pretty legal. msg[size] is having value 0. So I guess the loop would never execute. PS: If your compiler is generating any error, please post … | |
Re: >>.i will user ur code as a reference code and will write my own code after >>undertanding it You know, first I thought I should believe your on this. But then my 6th sense told me not to. I am sorry. | |
Re: Take a paper, take a pen. Scribble something until it makes sense. Posting without trying is not wise, It just show your ignorance. Although we are here to solve your queries, We, can't work until we have some berries. Those berries are your tries, So, don't post before attempting, it … | |
Re: Arrays and pointer are closely related in C. But first tell me what book are you using? Anyways, one advice: your scripting languages like Python and Perl makes you feel that programming is fun, this is not the case with C. I am sure you will have to do quite … | |
Re: >>Yeah, it's .c_str() NO. it is [URL="http://www.cplusplus.com/reference/iostream/stringstream/str.html"].str()[/URL] for string streams.It will return a string object on which you will have to do a .c_str(). So the corrected code would be somewhat like this: [CODE=cplusplus]#include<iostream> #include<sstream> int main() { std::stringstream arg; const float pi=3.145745; arg<<"AdjustSealevel.exe "<<pi; std::cout<<arg.str().c_str(); system( arg.str().c_str() ); } … | |
Re: Perhaps this [url]http://www.boost.org/doc/libs/1_41_0/libs/numeric/ublas/doc/matrix.htm[/url] or this [url]http://www.osl.iu.edu/research/mtl/[/url] | |
Re: >I need a function in c++ to calculat the age of a user, by asking the user to >enter his birthday. I think you're confusing this forum with the one who give away code. Read the forum announcement. We help only those who show efforts. What have you tried so … | |
Re: I suggest you to change the return type of the `menu()` to int. If the user wants to continue return 1 and he doesn't wants to continue(that is, when he pressed 5), return 0 Then inside your `main()`, you can simply do like this: int main(){ while( menu() ); } … | |
Re: >for ex if an array has 10 items then n-1 would give u the size of that >array, since index of arrays stars from 0. I think it should be that if an array has [U]n[/U] items then n-1 would give u the [I][U]highest possible subscript[/U][/I] of that array, since … | |
Re: The if-else is redundant; A number which is smaller than 10, when undergoes modulus operator with divisor as 10 will yeild that number itself. 7%10=7 1%10=1 and so on... Your reverse function is not designed well: You are trying to print the reversed value of the number in the function … | |
Re: Aladdin's Magic lamp. 2 Burgers, 1 Large pizza with extra cheese and a diet coke. Sh*t, nothing is working. This website is junk | |
Re: Well, I remember I ran into a problem when I needed to install MinGW on a machine with no Internet Connection. So here is what I did: I downloaded the Codeblocks setup from the website: the one which is of nearly 20MB ( that comes along with MinGW). I installed … |