Posts
 
Reputation
Joined
Last Seen
Ranked #31
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
84% Quality Score
Upvotes Received
115
Posts with Upvotes
98
Upvoting Members
37
Downvotes Received
19
Posts with Downvotes
17
Downvoting Members
12
118 Commented Posts
10 Endorsements
Ranked #180
Ranked #145
~252.92K People Reached
Favorite Tags

518 Posted Topics

Member Avatar for tina.2826

>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.

Member Avatar for Shubham_12
-1
4K
Member Avatar for huzeifa

[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.

Member Avatar for Ancient Dragon
0
4K
Member Avatar for boogeyman77

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: …

Member Avatar for Mahfuz_1
0
640
Member Avatar for tformed

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. …

Member Avatar for vmanes
0
3K
Member Avatar for dumbncool

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 …

Member Avatar for anuj.juthani
0
825
Member Avatar for gtsreddy

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 …

Member Avatar for vijayan121
0
718
Member Avatar for JuliaCplus

>>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 …

Member Avatar for NathanOliver
0
922
Member Avatar for cl2020
Member Avatar for dooper

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])

Member Avatar for Masterlynx
0
308
Member Avatar for bunteezone

>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 …

Member Avatar for santanu@code
0
30K
Member Avatar for lss123

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 …

Member Avatar for JamesPhillips
0
702
Member Avatar for kookai

>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 …

Member Avatar for Nick Evan
0
2K
Member Avatar for spring sun

>>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 …

Member Avatar for technology
0
220
Member Avatar for m-lamaa

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.

Member Avatar for siddhant3s
0
145
Member Avatar for viziroth

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 …

Member Avatar for iamthwee
0
105
Member Avatar for aloush91

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 …

Member Avatar for Banfa
0
177
Member Avatar for restrictment

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.

Member Avatar for iamthwee
0
196
Member Avatar for empror9

>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' …

Member Avatar for siddhant3s
0
162
Member Avatar for fellixombc

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 …

Member Avatar for fellixombc
0
127
Member Avatar for bl@ck_d3ath-v2

>>.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.

Member Avatar for NathanOliver
-2
1K
Member Avatar for ultrAslan

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 …

Member Avatar for mrnutty
0
95
Member Avatar for orwell84

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 …

Member Avatar for orwell84
0
113
Member Avatar for wiglaf

>>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() ); } …

Member Avatar for Frej
0
2K
Member Avatar for timtianchen

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]

Member Avatar for timtianchen
0
80
Member Avatar for لولا

>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 …

Member Avatar for siddhant3s
0
77
Member Avatar for jessicamelillo

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() ); } …

Member Avatar for Murtan
0
89
Member Avatar for ronny22

>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 …

Member Avatar for ronny22
-1
169
Member Avatar for Jannelle5

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 …

Member Avatar for jbennet
0
347
Member Avatar for kavitha1591

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

Member Avatar for rimmmeee
0
192
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
4K
Member Avatar for RohitSahni

[url]http://www.ittb.pcriot.com/forum/viewtopic.php?t=24[/url] Here is your answer.

Member Avatar for shashanderson
0
239
Member Avatar for maddy1985

>how to use isalpha to chech for a character Check the [URL="http://www.cplusplus.com/reference/clibrary/cctype/isalpha/"]reference[/URL]. Next time, if you intent to ask a C-related question, check out the C Forums of this website. By the way, a quick example of isalpha is: [CODE=c]#include<stdio.h> int main() { char c; printf("Enter a char"); scanf("%c",&c); if(isalpha(c)) …

Member Avatar for mrnutty
-1
100
Member Avatar for Kl2eativ

Learning from examples is a great way to understand things; only if you understand the example completely before trying to fit your crude analogies. And when you are not able to construct a basic loop, a quick look-up on to your text book wont do harm. I would suggest you …

Member Avatar for siddhant3s
1
109
Member Avatar for HappyOrangutan

If at all you want to throw string literals, remember that they are const char* not simply char*. So refactor your code as: [CODE=CPP]void Xhandler(int test) { try { if (test) throw test; else throw "Value is zero"; } catch (int i) { cout << "Caught One! Ex. #: " …

Member Avatar for HappyOrangutan
0
226
Member Avatar for rockermonki

Uh good. But I think you realised your limitation. For sorting integers, there are [URL="http://en.wikipedia.org/wiki/Sorting_algorithm#Summaries_of_popular_sorting_algorithms"]many algorithm available[/URL]. But before that, you need to build a common program to try those. This program includes code to input N numbers into an array. Then it sorts the array using one of the …

Member Avatar for rockermonki
0
195
Member Avatar for plobby

>U dont need to validate them like that. Actually he needs to. If the user enters any non-numeric character, his program can hang, halt, break or whatever. The worst part is, that the programmer won't be able to display a error message. >Link failbit, badbit, goodbit and stuff only makes …

Member Avatar for mrnutty
0
140
Member Avatar for Towely

[QUOTE=Towel][CODE=cpp]rev1 = 0; { num3 *= 10; num3 += rev1%10; rev1 /= 10; }[/CODE][/QUOTE] Looks like you are trying to loop some statements. But the syntax of the loop is not correct. Read [url]http://www.cplusplus.com/doc/tutorial/control/[/url] (Loops) to find out the correct format.

Member Avatar for siddhant3s
0
189
Member Avatar for sfurlow

[URL="http://www.cplusplus.com/reference/iostream/stringstream/"]stringstreams[/URL] are often useful when you want to parse a sting input, specially when you need to do something with words. So make a stringstream and use the >> operator to fetch out one word at a time. Check if that has a .length() equal to 3. If yes, increase …

Member Avatar for siddhant3s
0
94
Member Avatar for iamjin01

Use a s[URL="http://www.cplusplus.com/reference/stl/map/"]td::map[/URL]. Create a map<std::string, int>. Scan through the file and insert each of the word to the map with initial value 1. If the word already existed, increment its value. Study the insertion example given on [url]http://www.cplusplus.com/reference/stl/map/insert/[/url]

Member Avatar for siddhant3s
-1
75
Member Avatar for lancevo3

Consider the parenthesised version of the OP's code: [CODE=cpp] double ExprTree::evaluate(TNode* p) const { //this is the first if if( p->data == "+" || p->data == "-" || p->data == "*" || p->data == "/" ) { double op1 = evaluate(p->left); double op2 = evaluate(p->right); if(p->data == "+") //if number …

Member Avatar for sfuo
0
783
Member Avatar for dag7399

>>nope.can you help me solve my problem??please... >>hey there FirstPerson.I m new with c++ so i think i m zero with it.can you help me >>with my problem?? >>As you know firstPerson i m new with c++.I m think i m a litle bit blur what just you >>tech me..Sorry.Could …

Member Avatar for siddhant3s
0
100
Member Avatar for chandagondhali

Get some sand and clay. Try to first model desks and benches. Then model teacher and students. And your class is ready.

Member Avatar for siddhant3s
0
65
Member Avatar for I_Empire

>>little ugly Is it? This is the correct way to the thing what you want. You create a class template when you want to separate the implementation of the whole class according to the template parameter. But here, this is not what you want to do. In fact, you could …

Member Avatar for siddhant3s
0
277
Member Avatar for nida afaq

>can u plz explain that when is the order of precedense will be right to left? Are you deaf? Look at the post #2 and try to accept that what ever niek has said is actually true. Your program is suffering from [URL="http://en.wikipedia.org/wiki/Undefined_behavior"]undefined behaviour[/URL]. All that means to you is …

Member Avatar for kvprajapati
0
140
Member Avatar for invisi

>In your function, you allocate new memory for the array >that is passed, which already has been allocated memory. I suppose he has commented that line. Hence technically, there are no memory leaks in the first program. OP>Why is that anyone know? That is because the .size() member function of …

Member Avatar for invisi
0
141
Member Avatar for nateuni

>1. Passing into a function and then into a sub-function. Did you asked Google? Anyways, I did it for you: [url]http://www-ee.eng.hawaii.edu/~dyun/ee160/Book/chap6/section2.1.2.html[/url] >2. Passing 2d arrays, this had just mucked me up. [url]http://www.physicsforums.com/showthread.php?t=270319[/url] and [url]http://cboard.cprogramming.com/c-programming/97898-passing-2-dimensional-array-function.html[/url] >3. Making comparisons between pointers and ints Sorry I did not got this properly to make …

Member Avatar for mrnutty
0
214
Member Avatar for eggowaffles

I think one should always try to look at the date of the last post before replying to a thread no one is interested to read. It is more than an year old.

Member Avatar for mrnutty
0
148
Member Avatar for hket89

>Got exam tomorrow So you've been screwed. Now did you remember when your instructor told you to read a text book? >Anyone know that c program got wat type of error? [URL="http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-no-answers.html"]Yes[/URL].

Member Avatar for LordoftheFly
0
191
Member Avatar for almasari

>Task: >Write a program to grade a test and print the student’s score. The task was given to you. You will be given grades for that. You are redirecting the task to us, we won't get anything out of it. But that was perfectly fine if you could get any …

Member Avatar for mrnutty
0
93
Member Avatar for shadwickman

>Seriously? There's no options that do this for regular functions, the >same way it can be done for the main function when it's handed >command-line arguments? I thought it was possible to do C++ supports function overloading in which you can have variable number or arguments: [code] int fold(int x,int …

Member Avatar for shadwickman
0
167

The End.