104 Posted Topics

Member Avatar for kimw

[url=http://cplus.about.com/od/stltutorial/l/aa120103e.htm]Map/Multimap[/url]

Member Avatar for Grunt
1
141
Member Avatar for SHWOO

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]

Member Avatar for mostafadotnet
1
142
Member Avatar for VinC

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.

Member Avatar for Bench
0
426
Member Avatar for kimw

There is some kind off settings problem with your files. I can't think of any other reason. Check again.

Member Avatar for Salem
0
230
Member Avatar for ravi_forum
Member Avatar for brianotieno
Member Avatar for Dave Sinkula
0
335
Member Avatar for ishwar

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

Member Avatar for ishwar
0
22K
Member Avatar for akadri

I am with Jwenting. I prefer VC2005. I've started hating DEV C++ now. Even Code::Blocks is better than DEV C++.

Member Avatar for WaltP
1
261
Member Avatar for saishn
Member Avatar for ishwar

I guess you can make use Boost Filesystem Library [url]http://www.boost.org/libs/filesystem/doc/index.htm[/url]

Member Avatar for WolfPack
0
138
Member Avatar for SHWOO

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]

Member Avatar for WaltP
0
242
Member Avatar for hay_man
Member Avatar for Gunner54

Gunner54, See this [url]http://msdn2.microsoft.com/en-us/library/ewcf0002.aspx[/url]

Member Avatar for Gunner54
0
815
Member Avatar for l-o-s-t
Member Avatar for happy8899
Member Avatar for ammu117
Member Avatar for Grunt
0
180
Member Avatar for Smoke

Another lazy person [url]http://msdn.microsoft.com/vstudio/express/visualc/[/url]

Member Avatar for WaltP
0
79
Member Avatar for sgriffiths

Use functions of string class. find() and replace()-[url=http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm]Link[/url]

Member Avatar for Micko
0
156
Member Avatar for ammu117

Code:Blocks is definetly better than DEV C++. Atleast it's not bloated like DEV C++.

Member Avatar for Grunt
0
139
Member Avatar for joshilay
Member Avatar for SHWOO

And it's always a good idea to reset cout's precision to it's original value.

Member Avatar for Salem
0
241
Member Avatar for tln26
Member Avatar for Cyrus_DB

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

Member Avatar for Grunt
0
90
Member Avatar for cezarjont

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

Member Avatar for cezarjont
0
928
Member Avatar for myques

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

Member Avatar for ~s.o.s~
-1
137
Member Avatar for anu_dinoo
Member Avatar for freesoft_2000

Change [inlinecode]cin>>a ;[/inlinecode] to [inlinecode]getline(cin,a);[/inlinecode] and remove [inlinecode]#include <strings.h>[/inlinecode] and [inlinecode]#include <stdio.h>[/inlinecode]

Member Avatar for Lerner
0
161
Member Avatar for taha54

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>

Member Avatar for WaltP
0
1K
Member Avatar for ze_viru$

Also change the prototype of function to [inlinecode]void ReadInput (int&,int&);[/inlinecode] I guess it's pretty obvious but I am still reminding.

Member Avatar for Grunt
0
402
Member Avatar for inazdaud
Member Avatar for bharat.bhooshan

@Bharat <math.h>//deprecated in C++, use <cmath> <conio.h>//Non-Standard <dos.h>//Non-Standard

Member Avatar for Salem
0
194
Member Avatar for star22

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

Member Avatar for andor
0
1K
Member Avatar for soft_pro

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

Member Avatar for Dave Sinkula
0
905
Member Avatar for faizalw

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

Member Avatar for Lerner
0
111
Member Avatar for Wreef
Member Avatar for 00mike00uk

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.

Member Avatar for Dave Sinkula
0
228
Member Avatar for comp_sci11

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

Member Avatar for Grunt
0
445
Member Avatar for Wreef
Member Avatar for Wreef
0
146
Member Avatar for s_nagula

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.

Member Avatar for Ancient Dragon
-1
133
Member Avatar for dilip.mathews

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 …

Member Avatar for Laiq Ahmed
0
159
Member Avatar for dev.cplusplus

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.

Member Avatar for Grunt
0
70
Member Avatar for joshilay

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

Member Avatar for Dave Sinkula
0
605
Member Avatar for dilip.mathews
Member Avatar for Rosicky

Rosicky, try reading this [url]http://en.wikipedia.org/wiki/Binary_search_tree[/url]

Member Avatar for ~s.o.s~
0
148
Member Avatar for rbabakuliyev

You can download audio tutorials of Thinking In C, Bruce Eckel from [url]http://www.mindview.net/[/url]

Member Avatar for Grunt
0
108
Member Avatar for Shital Parab

Any good reason to do that? Using temporary variable will be much better.

Member Avatar for Salem
0
222
Member Avatar for Daan
Member Avatar for blazinking

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]

Member Avatar for WolfPack
0
147
Member Avatar for moe1983
Member Avatar for dilip.mathews

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.

Member Avatar for WolfPack
0
135

The End.