Beginners - November 2015 (Page 16)

Passing character input from text-box to function
 
Im at college atm, second year and we are doing c++ On on the task to choose a program to make and complete within 4 weeks. and so far it been going well. But i...
[1 reply] : if (har2 == "kevo") You can't compare char* with == , you need t... (by Thomas1965)
Help getting program to pass variables
 
I need some help trying to figure out why my program is not passing variables to other functions #include <fstream> #include <iostream> #include <iomanip> ...
[1 reply] : " why my program is not passing variables to other functions?" can you... (by Bdanielz)
Input from a file
 
Hi, is there a way I can read/write from/to a specific line in a file?
[1 reply] : The easiest way is to read the whole file, line by line, do the change... (by Peter87)
String is ambiguous (I've looked online no answers)
 
So my compiler (Visual Studio Express 2015) says that the string left, right, and empty are ambiguous, I've looked online on google and everything and I can't c...
[4 replies] Last: Thank you guys for the answers :) I get more now, so I'll start doing ... (by freakfallout)
by jsfq
sudoku
 
I am trying to write a program that will help play Sudoku. It needs to read in the data from a txt file using a get. And follow the letter commands N= new game,...
[1 reply] : What is the purpose of line 24? It reads the first character of the ne... (by Peter87)
File Stream Questions; Changing from string to int?
 
Program that allows the user to create an account (username and password) and writes that to a file and recalls it so that they can login to do banking within t...
[1 reply] : You could read and write integers directly. Just pass integer variable... (by Peter87)
use getline without breaking
 
This is my code for a simple addition calculator (I'm learning how to use int function() : #include <conio.h> #include <iostream> #include <string> usin...
[2 replies] Last: thanks for the reply, i kind of understand why they wouldn't let you u... (by FluorescentGreen5)
little problem with a structure of arrays
 
its a really begginer question. i started by myself a few days ago.. i have the following structure of arrays. im using it to store the dimensions of 3 diffe...
[1 reply] : strange, can you show as the code? (by xenoviaquarta)
Need some guidance with passing struct by reference
 
Hey guys I was hoping to see if you guys could give me a push in the right direction.... I have a small program written out and I need to incorporate a few thin...
[5 replies] Last: I'm just now getting memory addresses for the values entered instead ... (by cire)
reading words from a txt file into a string vector
 
...
[10 replies] Last: ok I found my mistake. I forgot the * for the inner while loop. (by backslashV)
by fsmn26
Explanation of output
 
I need help with an explanation of how exactly the code works to get the following output, it't a bit confusing. #include <iostream> using namespace std;...
[no replies]
Need help correcting a test
 
Hi everyone, so I had my second computer science exam last week in university and I got it back today, and didn't do that well, although the class average was o...
[6 replies] Last: haha no rush here, just want to learn from my mistakes! okay thanks so... (by closed account i8bjz8AR)
Need Help running program from cmd prompt
 
Hi, I just needed help running a program from the cmd prompt as was required by my prof for an assignment question. It basically needs to run after typing a3 fi...
[10 replies] Last: I've already answered that question. (by Duthomhas)
replace 1 file with another
 
so im trying to replace a back up file with the main file and vice versa im not sure if CopyFile("F:\\iofile.txt", "F:\\ARCHIVE.txt", TRUE ); is correct or...
[no replies]
Distinguishing between integers and doubles in a file
 
Hi, I'm quite new to reading and writing to files. But basically, I have an assignment where part of it requires me to determine whether a line from a file is a...
[1 reply] : std::string::find http://en.cppreference.com/w/cpp/string/basic_str... (by cire)
by Reekoh
Pin Authentication/ reading specific lines *help*
 
Hi there all. I would just like to ask a question regarding reading specific lines from a file with the use of a "PIN number" keyword. After authentication woul...
[no replies]
string redactdigits Please help ThanX
 
can you help write the code for this, I have no clue? // replace digits with #'s // e.g. redactDigits( "4 pizzas and 87 beers" ) returns "# pizzas...
[3 replies] Last: thanks for the replay but the code doesn't work The code does work. ... (by cire)
by Aurix
Beginner needing help with run time check failure #2
 
Can't seem to find what is causing the issue here so maybe someone with some experience can give me a little insight. #include <iostream> #include <ioman...
[1 reply] : Looping on eof is wrong. You make no effort to ensure that i in the... (by cire)
resizing containers from static capacity
 
so I have a list that I initialize with capacity of 100 and write stuff to it. Not all of the indices are filled so I thought that I could do: myList.re...
[1 reply] : If you set the size of the list to 100 it means it will contain 100 el... (by Peter87)
by cspace
Rules for return by value: when is a copy made?
 
Returning a local variable by value does not seem to involve the copying of that variable. My 1st question is: is this always the case or is this a type o...
[2 replies] Last: Thanks very much. (by cspace)
November 2015 Pages: 1... 1415161718... 53
  Archived months: [oct2015] [dec2015]

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