Beginners - April 2017 (Page 20)

Overloading bool function
 
I keep having trouble trying to overload the boolean function. I cannot figure out the syntax. Below is what I currently have. What I want it to do is receive a...
[2 replies] Last: Below is part of checker code for the overloaded bool which I am tryin... (by napkinthief)
Error:no match for 'operator>>'
 
In my OpenFile function it should prompt user to enter a file name and read the file into an array. I keep getting the error: no match for 'operator>>' (operand...
[2 replies] Last: You need to overload the >> operator for your entryType, st. like: i... (by Thomas1965)
Login system won't accept correct info after one failed attempt (while loop)
 
I am writing a simple login system utilizing a simple hash calculator to verify passwords inside of a class. The system asks for username and password if i ente...
[1 reply] : Line 5: Why is x global? x should be a local variable within hashCal... (by AbstractionAnon)
Help with finding numbers to the alpha power that sum to n.
 
I am trying to solve this homework question and I think I solved it because it looks like my program works, so I am asking for help to see if there is a way to ...
[2 replies] Last: Also, I noticed that when I enter a sequence that should make k = n, i... (by Dj42)
Bool keeps returning false
 
My bool keeps returning as false even though it has been initialized true. // This is what im calling in main.cpp // cout << "Admin: " << users .getAd...
[2 replies] Last: OMG DUDE THANK YOU SO MUCH I COMPLETELY SKIMMED OVER THE FACT AN ARRAY... (by KingpinKeys)
by kinley
fatal error LNK1120: 1 unresolved externals
 
Hi, I have these two files global.h #include <iostream> #include <map> #include <vector> #include <string> using namespace std; extern map<s...
[7 replies] Last: Thank you very much Andy! It worked flawlessly. (by kinley)
INCORPORATE IF ELSE IF STATEMENT INTO WHILE
 
I need to incorporate an if else that only add points if they are good else make them enter again. Can someone please help me with this? //This program will...
[4 replies] Last: I was able to get the program to work correctly by moving the calculat... (by fresh716)
cannot delete from empty list
 
cannot delete from empty list user inputs 1 line user deletes 1 line user deletes 3rd line which is nothing *crashes here* #include <iostream> #include <str...
[1 reply] : cannot delete from empty list This is correct. using advance(...) The... (by coder777)
by SKREFI
ifstream error!
 
I am learning and I don't get what happen here... saw on internet name.get(letter); but I don't wanna use char, my n in an int! is that the problem ? ...
[3 replies] Last: Hello, Also, from reading my old textbook, you could use the getline... (by Shishykish)
How can I use switch to use a particular class function from an object with values determined by the user?
 
Hello, I have a task to make a simple fraction calculator using classes. I am having a particular issue where I cannot get my switch function to select a pa...
[6 replies] Last: Hello, I am sorry, I didn't notice that. I clicked on it twice by ac... (by Shishykish)
c++ string how do i input with spaces
 
i want the user to input a string with or without spaces this is my code what do i need? void inputf(list<string> &L) { string input; int lines; c...
[9 replies] Last: yes, boost, you're right (by gunnerfunner)
How do i combine this into text editor
 
Hello. Im not sure if i am able to create a post just after i got solved another one but i hope so. So here is my qestion. I need to connect somehow those codes...
[2 replies] Last: #include <iostream> #include <fstream> #include <curses.h> #define ... (by Cppmiel)
Infix to Postfix Please Help!!
 
My infix is A * B + C * D * E + F and the postfix that is outputting is A B C D E F + * * + * which is incorrect. Please help me get correct output. Her...
[2 replies] Last: Hi, hockey34. There’s at least an error in logic. You should not pop... (by Enoizat)
Reading lines from text file
 
Hello, i am kinda new to programming and here is my question. I need to do a text editor(something like microsoft notepad but more simple). Im trying to do it s...
[2 replies] Last: One way to read a file line by line ifstream src("YourFileName"); ... (by Thomas1965)
Returning function value error using array/vector
 
Looking for someone to point me in the right direction for correcting the errors I am getting with my code. I already did some extensive searching and couldn't ...
[4 replies] Last: Thank you very much ! I actually figured out how to use the iterator v... (by inkaddict92)
Dynamically allocated array
 
I'm creating an address book program that allow user to search by first name, last name,phone number and address. The user is prompted to enter a file name and ...
[1 reply] : Beside bookArray you need a variable for the amount of read records:... (by coder777)
Filling a 2-d array from file
 
Hello I have a project where I have to implement a seat reservation system for a passenger airplane. I'm required to use a function to read the file "chartIn.tx...
[1 reply] : Have you seen this? http://www.cplusplus.com/doc/tutorial/files/ (by Bdanielz)
Unable to resolve identifier _tprintf
 
Hi, I need some help here. I found this code at https://msdn.microsoft.com/en-us/library/windows/desktop/aa365200(v=vs.85).aspx and tried to run it. But apparen...
[4 replies] Last: Does Netbeans use MinGw? I heard that MinGw has missing parts in the w... (by Thomas1965)
stl list how do swap iterators?
 
Write your question here. list <string>::iterator it = myList.begin(); string firstLine; string secondLine; ...
[7 replies] Last: im learning the basics im probably going to learn news things later ... (by TheIdeasMan)
Boost filesystem
 
Hi, I am having a problem to compile this coding. While installing cygwin, I include boost filesystem package. But this code does not work. Do I have to downloa...
[2 replies] Last: It occurs to me that maybe you were trying to write a range-based for ... (by mbozzi)
April 2017 Pages: 1... 1819202122... 34
  Archived months: [mar2017] [may2017]

This is an archived page. To post a new message, go to the current page.