Beginners - July 2016 (Page 8)

Reading from a text file into an array
 
I am having trouble reading a last name , first name from a text file into a string array. When I compile the code, it is skipping the comma and saving each lin...
[2 replies] Last: Thank you for your help! That seemed to do the trick. I knew it had to... (by mcoker611)
by roots
Turning into bool function
 
I believe writing this code where it returns a bool in the function would be more preferred. Wouldn't it be more efficient as well? Correct me if I am wrong. ...
[4 replies] Last: Sorry. My return type was incorrect. Should have been a bool. I've ... (by AbstractionAnon)
A while loop with a switch statement inside a for loop.
 
I've just started learning C++!! Any help with this would be great! This program should simulate voting and display the result. There are 4 voting stations ...
[7 replies] Last: I think I'll do it the rinse and repeat method as functions are beyond... (by redman008)
C++ Functions single parameter
 
My problem is to complete a partially written C++ program that includes two functions that require a single parameter. The program continuously prompts the use...
[2 replies] Last: I figured out my problem - thanks much (by weyekin03)
C++ Noob question
 
Hi, I am new to C++ and i've caught myself stuck on my first project. I am trying to make a game that has 5 pumps which you can turn on or off. I seem to hav...
[4 replies] Last: Lines 6-10 are going to output the numeric value of the enum. You pr... (by AbstractionAnon)
by roots
Password verification
 
I am not even getting the error statement back. I am guessing that the issue is in main and not in the other functions. I am unsure of where. The if statement l...
[6 replies] Last: Silly me! Thanks Thomas1965. And AbstractionAnon for the debugging tip... (by roots)
File Size Problem
 
Hi,so I wrote the code as given below, but can't get it to work because it gives me an Error. File not found meaning that argc != 2 . Thereof I have a qu...
[13 replies] Last: Great stuf - another green tick purely for reducing unnecessary revisi... (by closed account 48T7M4Gy)
Polynomials sorting using maps
 
This code works perfectly and sorted weather if I use linked lists or maps, but based on maps features I believe the sorting of this code should be done in anot...
[2 replies] Last: Thank you @AbstractionAnon Solved (by sasafeb)
list::unique
 
Could someone explain to me how the unique function works here ? class pred{ public: bool operator()(int a,int b){ return a<b; } }; //.......
[8 replies] Last: I was going to report this as an error on the list::unique page, but i... (by AbstractionAnon)
by alx119
A silly question
 
Why is the result 7 ? int main() { int i = 6, value; if ((++i > 7) && (i++ < 8)) value = 1; else value = 2; printf("%d\n", i); return 0...
[4 replies] Last: It wasn't a silly question at all! I looked at it and wondered myself ... (by Yawzheek)
by Carat1
Help User Input
 
I'm new to C++ and I mainly use VB. I need help capturing user input from a textbox. For example, I open up my application and see a blank textbox. I type in "H...
[3 replies] Last: thank you that worked (by Carat1)
by OState
Inquiry on Editing File Details via C++
 
Hello, A preface to detail my experience level: I took an intro to C++ programming course for engineers in university two years go, I have basic understanding ...
[4 replies] Last: Dear closed account, I graduated on the Summer of 2015 and I intend t... (by OState)
Compilers
 
I'm currently running Dev c++ for school and was told there is better up to date options out there so I downloaded code blocks. It auto detected my old compiler...
[5 replies] Last: try making project on different folder (by shadder)
Line Count Programming Challenge (1,2)
 
I have a problem of figuring out what I am asked to do and how to start. The problem is this: Here's a simple help free challenge to get you started: write ...
[38 replies] Last: http://www.cplusplus.com/forum/beginner/194740/ I can fully understan... (by closed account 48T7M4Gy)
Cant start a C++ project with code blocks?
 
So I have Code Blocks. The compiler is GNU GCC compiler. I try to make a C++ project and I get a message that says. Couldn't create the project directory? any i...
[1 reply] : Couldn't create the project directory? What operating system are you... (by jlb)
std::find help
 
So I have this code example std::ifstream bindings; std::string line; bindings.open("keys.cfg.txt"); while(std::getline(bindings,line)) { std::stringst...
[1 reply] : What did you expect? Remember std::string.find() is zero based, just... (by jlb)
Static keyword does not make function internal linkage?
 
In book "C Primer Plus" there is a paragraph about linkage of functions: By default, C++ functions have external linkage, so they can be shared across files. B...
[1 reply] : The reason you're not seeing your expected error is because you have e... (by jlb)
String errors?
 
I've just recently tried to make a program using multiple files, mainly just in order to keep things organized. in my "Include.h" file I declare all the functio...
[7 replies] Last: http://www.cplusplus.com/forum/beginner/194767/ (by closed account 48T7M4Gy)
I have no idea
 
I've been working on "this" code" for about 2 hours now and for the life of me can't figure out how to fix these errors. My functions.h file: #include ...
[3 replies] Last: http://www.cplusplus.com/forum/beginner/194713/ (by closed account 48T7M4Gy)
Calendar Program Remove Modulus Help
 
How can I make this work without the modulus operator? Its for a calendar program... void printDays(int firstday, int day) { for (int j = (1+first...
[1 reply] : You can use integer division combined with a subtraction, or repeated ... (by closed account 48T7M4Gy)
July 2016 Pages: 1... 678910... 30
  Archived months: [jun2016] [aug2016]

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