377 Posted Topics

Member Avatar for Dani
Member Avatar for Dani
0
211
Member Avatar for h46

[URL=http://www.daniweb.com/techtalkforums/announcement8-2.html]Rules[/URL]

Member Avatar for SpS
0
89
Member Avatar for Acidburn
Member Avatar for winbatch
Member Avatar for Narue
0
203
Member Avatar for kahaj

operator :: known as scope resolution operator has been introduced to access an item that is outside the current scope. This operator is also used in distiguishing class members and defining class methods.

Member Avatar for SpS
0
897
Member Avatar for iqbal

It compiled fine in VC6.0...yes it did gave 2 warnings regarding truncation from const double to float....i made two changes two remove those warnings [code]float f = 1.1[color=red]f[/color] ; cout << "Pushing elements onto fs" << endl ; while (fs.push(f)) { cout << f << ' ' ; f += …

Member Avatar for SpS
0
125
Member Avatar for TimC

Try This [url]http://www.cprogramming.com/tutorial/stl/stllist.html[/url]

Member Avatar for SpS
0
165
Member Avatar for sahil_logic

[QUOTE=sahil_logic]see i want to learn . from next time i will give the compiler warnings . i will also include wat attempts i made.so tell me why not to use " gets " when my professor uses it very often.[/QUOTE] He is one stupid proffesor..who should be kicked out of …

Member Avatar for perniciosus
0
408
Member Avatar for Niklas

See This...ur basic problem was not using ')' and '}' at many places...There are better ways to do this program...like using switch...u should read a bit about that in ur book or search for any beginners tutorials [code] #include <iostream> using namespace std; int main() { cout <<"Welcome to the …

Member Avatar for Niklas
0
173
Member Avatar for sahil_logic

This Is The Right Code [code] #include<iostream> using namespace std; int main() { int a[10],temp,i,j,m; cout<<" enter the elements "<<endl; for(i=0;i<5;i++) cin>>a[i]; m=a[0]; for(i=0;i<4;i++) { for(j=i+1;j<5;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } cout<<endl; for(int k=0;k<5;k++) { cout<<a[k]<<endl; } return 0; } [/code]

Member Avatar for perniciosus
0
188
Member Avatar for Asif_NSU

can u plz tell the errors or the code which gives error....does it show [b]cpp: Usage:... Error[/b]

Member Avatar for perniciosus
0
188
Member Avatar for freesoft_2000
Member Avatar for sahil_logic

In switch case u r declaring a prototype...it should be a function call there...from next time use code tags [code][/code]....and instead of arguing with people in the forum u should accept ur mistakes....try learning things....in your previous posts u said u downloaded DEV....i don't think u r using that Note: …

Member Avatar for dwks
0
111
Member Avatar for bucsoldier03
Member Avatar for sahil_logic
Member Avatar for dwks
0
192
Member Avatar for guideseeq

[QUOTE=guideseeq]Where can I download C++?[/QUOTE] Go to [url]http://www.bloodshed.net/devcpp.html[/url]

Member Avatar for perniciosus
0
454
Member Avatar for heavyc

Prototypes of functions are missing and change the name of swap function as it is already defined funtion

Member Avatar for perniciosus
0
195
Member Avatar for taha umar

See [URL=http://www.daniweb.com/techtalkforums/announcement8-2.html]This[/URL]

Member Avatar for perniciosus
0
167
Member Avatar for SNA
Member Avatar for dwks
0
66
Member Avatar for ToySoldier

Here Is The Corrected Code [code] #include <iostream> #include<fstream> #include <string> #include <iomanip> using namespace std; int main() { string first, last, code, name; ofstream outfile; ifstream infile; outfile.open("report.txt"); infile.open("people3.txt"); string state_codes[10]={"AL","CA","FL","GA","IA","KS","MO","MI","MS","NM",}; string state_names[10]={"ALABAMA","CALIFORNIA","FLORIDA","GEORGIA","IOWA","KANSAS","MISSOURI","MICHIGAN","MISSISSIPPI","NEW MEXICO"}; cout<<" PEOPLE REPORT"<<endl; cout<<" FALL 2006"<<endl; cout<<"FIRST "<<" LAST "<<" SS "<<" STATE "<<" STATE"<<endl; …

Member Avatar for perniciosus
0
226
Member Avatar for 123abc

[QUOTE=sam_dee]Need Programming Help try [url]link removed[/url] Enjoy[/QUOTE] Stop Spamming The Forum

Member Avatar for WolfPack
0
254
Member Avatar for atrusmre
Member Avatar for atrusmre
0
183
Member Avatar for Blue Storm

I have one idea which i tried and it was very successful...actually i didn't wanted the same old presentation...the power point one....every one did that...so i made posters of each of my slide and stick it on the walls of my class...then moved to each poster and explained it....and that …

Member Avatar for Blue Storm
0
127
Member Avatar for sahil_logic

It should be [code]str2[j]!='\0'[/code] not [code]str2[j]=!'/0'[/code] change '/0' in first for loop also...use fgets instead of gets

Member Avatar for Dave Sinkula
0
2K
Member Avatar for snaidis
Member Avatar for Narue
0
377
Member Avatar for SpS

Hi guys....I am planning to learn JAVA.....i don't know anything about it...just into C/C++.....don't know what compiler i should use.... suggest me some sites where i can download the compiler(Good One Please) for JAVA

Member Avatar for SpS
0
277
Member Avatar for comwizz

You'll find ur answer here [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_pow.asp[/url]

Member Avatar for jim mcnamara
0
374
Member Avatar for johnray31
Member Avatar for johnray31
0
453
Member Avatar for snaidis

There can be many solution to it....try using switch case without break....or better check the ascii value of entered value

Member Avatar for SpS
0
176
Member Avatar for johnray31

You didn't mentioned..u r learning C or C++.....u can take a look at code snippet section...u'll find one by dave_sinkula

Member Avatar for Dave Sinkula
0
250
Member Avatar for freesoft_2000
Member Avatar for peter_budo

Try running this code...it will make it clear [code] #include <iostream> int main() { int number; number=(1,2,3); std::cout<<number; number=1,2,3; std::cout<<number; return 0; }[/code]

Member Avatar for SpS
0
182
Member Avatar for Dee_Dee
Member Avatar for new guy n c++

[QUOTE=new guy n c++]HI all; this is my program which is A file contains 7 numbers per line and there are 8 lines and contains several records.[color=red] i have to Write a program to input each of the numbers[/color], find the highest number, the lowest number, their total and average. …

Member Avatar for Lerner
0
425
Member Avatar for micropower99

[QUOTE=micropower99]Hey guys, I'm new here, seeing as this is a C++ forum I was wondering if someone could help me out with a C++ assignment I have. I need to make a word counting program. Here is what I need: [url]http://desertonline.net/classes/cs89a/zbecker/files/Assignments/WordCount.htm[/url] Username: cs89a password: ctwo Anyone who completes this project …

Member Avatar for SpS
0
216
Member Avatar for sarra
Member Avatar for Savage221

store it in a character array and then compare each character with '-'....if it is equal to hyphen then skip it(don't store it) in the phone number array...use continue statement

Member Avatar for Savage221
0
298
Member Avatar for Chinjoo

[QUOTE=Chinjoo]Dude, This is just an example of traversal. The program can be extended to many other applications as well ![/QUOTE] There is a tutorial section...you can post your tutorial with detailed explanation there(if approved)...or better add to code snippet section(idon't think it requires approval)

Member Avatar for Cudmore
0
389
Member Avatar for StealthCobra

Plz use code tags from next time C++ is a case sensitive language....and u need to include <ctime> for time().....Here's is your corrected code...red coloured lines had problem [code] #include <iostream> [color=red]#include<ctime>[/color]//added this header using namespace std; int getRandom(); [color=red]void headTail(int &random, int &count);[/color] [color=red]void results(int &count);[/color] int main () …

Member Avatar for SpS
0
207
Member Avatar for stabule

You can take a char array and store the number in it and then take another character variable to hold the number for which u want to find the occurence. Then take a for loop and compare the entered character with each element of char array .....and count the total …

Member Avatar for winbatch
0
217
Member Avatar for arun_kumar_c
Member Avatar for scoobie

See These links [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1047589448&id=1043284376[/url] [url]http://www.daniweb.com/tutorials/tutorial10184.html[/url]

Member Avatar for rnodal
0
348
Member Avatar for stupidenator

I am not sure i got your question properly...but i guess what you need to do is to pass the size of the rows also to the function....arrays don't know there sizes...so u need to pass that or take a global constant that can be used anywhere

Member Avatar for stupidenator
0
91
Member Avatar for jack223

[QUOTE=jack223]class Thing { public: [color=blue]int Item;[/color] [color=red]Thing (int Value); Thing (int Value1, int Value2); int GetValue1 () const; int GetValue2 () const;[/color] private: [color=blue]int DataItem1; int DataItem2;[/color] [color=red]void SetValue1 (int Value); void SetValue2 (int Value);[/color] } [/QUOTE] Blue represent data members Red represent member functions

Member Avatar for jack223
0
119
Member Avatar for SpS
Member Avatar for 5starAffiliates
0
2K
Member Avatar for dav83

[QUOTE=dav83]Hi I want to use a File->Print choise in an application with the index written in a memo. how can i print the memo field as a text ?[/QUOTE] Just ask this vague question to yourself...can you figure out what it is about.....show us ur code if you want people …

Member Avatar for dav83
0
196
Member Avatar for server_crash

No need to add it in the class(not even allowed...i guess).....you can simply put it in global scope or use scope resolution operator... example [code] #include <iostream> namespace z { int x=0; } class Person { public: Person() { std::cout<<z::x; } }; int main() { Person obj; return 0; }[/code]

Member Avatar for server_crash
0
149
Member Avatar for JoBe

Here Is the corrected Code...Code In Red Was Missing [Code] #include <iostream> using namespace std; class SimpleCat { public: SimpleCat(); SimpleCat(SimpleCat&); ~SimpleCat(); [color=RED]SimpleCat[/color] FunctionOne(SimpleCat); [color=RED]SimpleCat*[/color] FunctionTwo(SimpleCat*); }; int main() { cout<<"Making a cat...\n"; SimpleCat Frisky; cout<<"Calling FunctionOne...\n"; Frisky.FunctionOne(Frisky); cout<<"Calling FunctionTwo...\n"; Frisky.FunctionTwo (&Frisky); return 0; } SimpleCat::SimpleCat() { cout<<"Simple Cat Constructor...\n"; …

Member Avatar for JoBe
0
247
Member Avatar for server_crash

[QUOTE=server_crash]I have the following code: [code] ostream Person::operator<<(ostream& out, const Person& p) { out << "/n*********************************" << endl; out << "Name: " << Person::getName() << endl; out << "Age: " << Person::getAge() << endl; out << "Health: " << Person::getHealthLevel() << "%" << endl; out << "Happiness: " << Person::getHappinessLevel() …

Member Avatar for prog-bman
0
559
Member Avatar for war_criminal

I am using Mozilla browser(latest)....it didn't ask for any plugin....i already have flash and shockwave player installed

Member Avatar for SpS
0
102

The End.