104 Posted Topics
Re: [url=http://cplus.about.com/od/stltutorial/l/aa120103e.htm]Map/Multimap[/url] | |
Re: Didn't see your complete code but in general Prototype should be like this [inlinecode]double biWeeklySalary( double *hours )[/inlinecode] and calling of function should be like this [inlinecode]bob.biWeeklySalary( hours )[/inlinecode] | |
Re: Code is fine and it works as expected in my compiler(gcc 3.4.5). Try using some other input mechanism which doesn't leave stuff back in the input stream. | |
Re: There is some kind off settings problem with your files. I can't think of any other reason. Check again. | |
Re: how about std::accumulate? There won't be + operator insight ;) | |
| |
Re: [code] char * str; string str2 = "hello"; str = const_cast<char*>((str2.substr(2,4)).c_str()); [/code] But why don't you use string class completely like this [code] string str; string str2 = "hello"; str = str2.substr(2,4);[/code] | |
Re: I am with Jwenting. I prefer VC2005. I've started hating DEV C++ now. Even Code::Blocks is better than DEV C++. | |
Re: [url=http://c-faq.com/decl/strlitinit.html]Reason[/url] | |
Re: I guess you can make use Boost Filesystem Library [url]http://www.boost.org/libs/filesystem/doc/index.htm[/url] | |
Re: Shouldn't your second for loop be like this? [code] for (int j = 0; j <= 12; j++) { cout << "Enter hours for day " << j+1 << endl; cin >> Array[j]; }[/code] | |
Re: Gunner54, See this [url]http://msdn2.microsoft.com/en-us/library/ewcf0002.aspx[/url] | |
Re: Where are you stuck? | |
Re: Download DEV C++ or Code::Blocks which used MinGW compiler system | |
Re: Another lazy person [url]http://msdn.microsoft.com/vstudio/express/visualc/[/url] | |
Re: Use functions of string class. find() and replace()-[url=http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm]Link[/url] | |
Re: Code:Blocks is definetly better than DEV C++. Atleast it's not bloated like DEV C++. | |
Re: @joshilay I don't think you get rvalue required errors. | |
Re: And it's always a good idea to reset cout's precision to it's original value. | |
Re: Show your code and what compiler you use? | |
Re: [url=http://www.google.co.in/search?hl=en&hs=Xpz&lr=&client=firefox-a&rls=org.mozilla:en-US:official&defl=en&q=define:general-purpose&sa=X&oi=glossary_definition&ct=title]Defination General Purpose[/url] | |
Re: @cezarjont Read chapter on functions in your book or atleast [url=http://www.cprogramming.com/tutorial/c/lesson4.html]this[/url] Get a better [url=http://www.bloodshed.net]compiler[/url] | |
Re: For C -->[url]http://www.c-faq.com/[/url] For C++-->[url]http://www.parashift.com/c++-faq-lite/[/url] For Java-->Ask in Java forum | |
Re: Change [inlinecode]cin>>a ;[/inlinecode] to [inlinecode]getline(cin,a);[/inlinecode] and remove [inlinecode]#include <strings.h>[/inlinecode] and [inlinecode]#include <stdio.h>[/inlinecode] | |
Re: 1. Open file 2. Retrieve data in a string 3. Compare 4. Once you find a match then read again till you find first <b> | |
Re: Also change the prototype of function to [inlinecode]void ReadInput (int&,int&);[/inlinecode] I guess it's pretty obvious but I am still reminding. | |
Re: Stop being lazy and search google. | |
Re: @Bharat <math.h>//deprecated in C++, use <cmath> <conio.h>//Non-Standard <dos.h>//Non-Standard | |
Re: Quickly edited your code to remove errors. This code looks like C code. [code] #include <stdio.h> #include <string.h> #define size 20 void inputdata(); void showdata(); void sort_asc_by_age(); void sort_desc_by_year() struct data { int age; int year; char course[6]; char name[20]; } students[20]; struct temporary //changed to struct? { int age; … | |
Re: [quote=hardcode]Now I want another code for devc++..please can anyone help...Draw a cicle.[/quote] You need to use some kind of external library for this. For example: [URL="http://alleg.sourceforge.net/"]Allegro[/URL] | |
Re: [quote=faizalw] If I work with number only, how can I lock the letters input, making the user to input only numbers?[/quote] You can do something like this [code]int number; if(cin>>number){ //code } else{ //code }[/code] | |
Re: Get a good buy instead of tutorials on internet. Check the sticky in the forum for recommended books. Try and involve yourself in the discussions in the forum. You will learn fast. | |
Re: [quote=comp_sci11]well i'm using C in this program.[/quote] Saying that won't help unless you show what you have tried till now. | |
Re: If we start mailing people how will it help others who want help on the same issue. Anyways show us what you have tried so far before asking for help again. | |
Re: Making constructors virtual doesn't make sense. In inheritance hierarchy objects are constructed from the base down to the lowest derived class. Making constructor virtual means that you would be using a derived class constructor before a base was even created. What's the purpose of using a derived class if the … | |
Re: How about creating array of pointers to elements of list and then using qsort to sort the array and then finally according to the order in array you can relink. | |
Re: [quote=Salem]> what are the features of c which are not available in c++ ??? C++ is a semantic superset of C. That is, everything you can do in C you can also do in C++.[/quote] Can we say that for C also? i.e C is semantic superset of C++. Everything … | |
| |
Re: Rosicky, try reading this [url]http://en.wikipedia.org/wiki/Binary_search_tree[/url] | |
Re: Any good reason to do that? Using temporary variable will be much better. | |
Re: Use min_element and max_element functions [url]http://www.cppreference.com/cppalgorithm/max_element.html[/url] [url]http://www.cppreference.com/cppalgorithm/min_element.html[/url] | |
| |
Re: Use a switch inside for loop. Iterate through the array, if you find the value you are looking for, then, increment count inside that particular case else do nothing. In the end, check whether count contains 4 or not and return true or false accordingly. |
The End.