377 Posted Topics
Re: I didn't noticed anything like that...I guess i got all email notifications | |
Re: [URL=http://www.daniweb.com/techtalkforums/announcement8-2.html]Rules[/URL] | |
| |
Re: yup..it should be done...simply a way to increase posts otherwise | |
Re: 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. | |
Re: 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 += … | |
Re: Try This [url]http://www.cprogramming.com/tutorial/stl/stllist.html[/url] | |
Re: [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 … | |
Re: 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 … | |
Re: 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] | |
Re: can u plz tell the errors or the code which gives error....does it show [b]cpp: Usage:... Error[/b] | |
Re: 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: … | |
Re: It is very difficult to read ur code...plz use code tags | |
Re: [QUOTE=guideseeq]Where can I download C++?[/QUOTE] Go to [url]http://www.bloodshed.net/devcpp.html[/url] | |
Re: Prototypes of functions are missing and change the name of swap function as it is already defined funtion | |
Re: See [URL=http://www.daniweb.com/techtalkforums/announcement8-2.html]This[/URL] | |
Re: [url]http://cboard.cprogramming.com/showthread.php?t=72442[/url] | |
Re: 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; … | |
Re: [QUOTE=sam_dee]Need Programming Help try [url]link removed[/url] Enjoy[/QUOTE] Stop Spamming The Forum | |
Re: Try This [url]http://www.codersource.net/mfc_ctabctrl.html[/url] | |
Re: 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 … | |
Re: 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 | |
| |
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 | |
Re: You'll find ur answer here [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_pow.asp[/url] | |
Re: See This [url]http://www.daniweb.com/techtalkforums/thread33624.html[/url] | |
Re: There can be many solution to it....try using switch case without break....or better check the ascii value of entered value | |
Re: 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 | |
Re: 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] | |
Re: [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. … | |
Re: [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 … | |
Re: See This [url]http://cimg.sourceforge.net/[/url] | |
Re: 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 | |
Re: [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) | |
Re: 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 () … | |
Re: 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 … | |
Re: you should not use gets, instead use fgets | |
Re: 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] | |
Re: 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 | |
Re: [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 | |
Overall I like The Change....but this yellow stuff is not really very attractive | |
Re: [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 … | |
Re: 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] | |
Re: 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"; … | |
Re: [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() … | |
Re: I am using Mozilla browser(latest)....it didn't ask for any plugin....i already have flash and shockwave player installed |
The End.