Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #3K
~11.3K People Reached
Favorite Forums

17 Posted Topics

Member Avatar for rayborn66

[CODE]#include <fstream> #include <iostream> #include <cstdlib> #include<limits> using namespace std; int main() { ifstream fin; ofstream fout; fin.open("getfromthisfile.txt"); if(fin.fail()) { cout << "Input file opening failed.\n"; exit(1); } fout.open("sendtothisfile.txt"); if(fin.fail()) { cout << "Output file opening failed.\n"; exit(1); } int next; int largest=0; int smallest; fin >> next; smallest = …

Member Avatar for Emran__
0
2K
Member Avatar for globberbob

This should do it...your condition loops because it will only check the first if staement..i think [CODE] do { cout << "... Are you a male or a female?..." << endl; cin >> gendercheck; if(gendercheck == "male") { gender = 2; } else if(gendercheck == "female") { gender = 1; …

Member Avatar for globberbob
0
188
Member Avatar for kazuki05

ahh....so many lines...cant handle it...:'( well for starters..just by looking at it...remove semi-colons in your function in lines 82 and 103..

Member Avatar for Anyzen
0
114
Member Avatar for baconswife

[B]>>I am getting the error x undeclared on line 26. What I currently have is [/B]is it because you didn't declare type variable in main?(int x)

Member Avatar for mike_2000_17
0
1K
Member Avatar for newbie_to_cpp

well you almost have it..but some lines there are not neede... [CODE] #include <iostream> #include <string> #include <cstdlib> // for system using namespace std; int main() { int dept_code = 0; string wrongSelection; cout << "\nChoose a Department to Proceed. Enter Dept. No. (1,2, 3 or 4)\n"; do { system("CLS"); …

Member Avatar for ceriamultimedia
0
116
Member Avatar for unexpert
Member Avatar for unexpert
0
170
Member Avatar for glamourhits

well if you look at your code closely particularly the do-while loop...you have only 2 do's and 1 while...and dont forget to pair all brackets {}

Member Avatar for Anyzen
0
190
Member Avatar for Anyzen

Hello.. Supposing that i have this code..i want it to end after a character is pressed..but i dont know what to add...i can end it if input is negative or zero..but not char..i tried some experiments but it will end up debug assertion fail..help would be great.. [CODE] // adds …

Member Avatar for Anyzen
0
117
Member Avatar for Anyzen

i have a code that reads lowest and the highest number with inputs that are all Integer but, once i have an input (ex. apple 200)...it wont read anymore, need help in what to input code that ignores letters [CODE]//reads numbers only ex. 100 200 300 int main() { ifstream …

Member Avatar for Kanoisa
0
158
Member Avatar for bmos

You could add another function if(isalpha(str[count])) it checks if all input is alphabet, it is invalid...

Member Avatar for Anyzen
0
6K
Member Avatar for Anyzen

Hello i have a code here that partially works...the point in the program is to store 10 array integers then outputs how many times that integer is entered ex. input: 1 1 1 1 1 2 3 3 2 99 output : 1 = 5 2 = 2 3 = …

Member Avatar for Anyzen
0
178
Member Avatar for ZlapX
Member Avatar for mrnutty
Member Avatar for Jackie91

OK..i tried to run it.. first...your case 1-5...remove the "single " [COLOR="red"]'[/COLOR] " then put bracket on each case [CODE] case 1: { //code here } break; [/CODE] then..your codes still buggy though..but no more error

Member Avatar for ShadowScripter
0
108
Member Avatar for Anyzen

good day.. i am starting to learn..and experiment in namespaces just simple one... calling void functions..then print f.h [CODE]#include<iostream> #include<limits> namespace A { void f() { std::cout<< "Testing \"void f()\""; std::cout<<std::endl; } }[/CODE] f.cpp [CODE]#include "f.h" int main () { A::f(); std::cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n'); std::cin.get(); } [/CODE] g.h [CODE]#include<iostream> #include<limits> namespace A …

Member Avatar for Anyzen
0
215
Member Avatar for Anyzen

Hello... In strings i learned how to sort about numbers... the question is, how does one sort letters? there are some sort in alphabet here in Daniweb but i cant understand its process is Letter A > than Z? is the computer using ascii values? isn't A(65)< Z(90)? if in …

Member Avatar for jonsca
0
100
Member Avatar for shortie05

you could start by wrapping it and sate your problem...so others might help you and LOOK at where you placed your bracket(first) should be below main() right? and a whole lot of errors along the way.. Good Luck

Member Avatar for gabryprof
0
101

The End.