Beginners - November 2014 (Page 24)

Finding instances of -user specified- character in file stream
 
Hey there, I am working on a program that is supposed to take input from a user in the form of a single character, it is then supposed to look for instances o...
[3 replies] Last: I figured it out. I included some of my variables for the larger progr... (by strflyr)
by iluv41
file is not being read correctly
 
I need to read in grade data from a file, but right now I cannot get the grades read in. The student name and class name is read in, but then the grades are...
[7 replies] Last: I removed the error checking to save space, both files work (by iluv41)
Calling function help?
 
Hey everyone, me again. I'm learning more about calling functions and pass by references this week in my class. For this program, it's supposed to show 10500 an...
[2 replies] Last: The way you had the cin statements is like you would have TWO salaries... (by Seag)
Uppercase to Lowercase Conditional Operation
 
Desired Output: Enter Line of strings: qwE Given line of strings: qwE Change strings: QWe My output: Enter Line of strings: qwE Given line of strings: q...
[9 replies] Last: Perfect, np :) (by Seag)
C++ help with writing the console output to file
 
Hello there. I have this code that basically generates a random conversation between me and the computer. The computer will read a file that contains a name in ...
[1 reply] : Instead of using cout ("console out"), use the ofstream variable you h... (by Seag)
Help with pointers
 
Ok, so I have this bit of code here. It compiled, but I don't understand part of it. Shouldn't cout<< *foo; spit out a random hexadecimal number, since *foo p...
[3 replies] Last: loopdydoo, First 15 minutes of this will clear it all up for you. ht... (by swp147)
by Myna
Help with strings please
 
Implement an algorithm to determine if a string has all unique characters. The user will enters a sentence and your job is to determine if there is repeating l...
[1 reply] : Disclaimer: I'm a beginner. There are probably much better ways to do... (by swp147)
Dynamic arrays and pointers.
 
This one of the homework questions I have, and I'm having some issues. I have to write a function that allocates a dynamic array with the size of the variabl...
[2 replies] Last: Cheers. (by mishappp)
Fill an array of struct door
 
What am i doing wrong? I keep getting errors. I included errors in code. Im supposed to read 2 arrays and put them in a file, then read the file and fill an ...
[7 replies] Last: Line 28,35: As PCrumley48 pointed out, length and width are out o... (by AbstractionAnon)
Objective C
 
Can someone explain what an instance's instance variables is? maybe even an example in code thanks :)
[no replies]
Question Mark not getting show in console
 
Hello I am trying to make a help screen for my project so user can use a switch such as exename.exe /? the problem is when I am checking the question mark is ou...
[no replies]
Assignment Operator Overload memory leak
 
This is about linked list. I don't know why I have memory leak on ASSIGNMENT OPERATOR =. Can you just ignore the other and just focus on the ASSIGNMENT OPERATOR...
[5 replies] Last: Thanks all Guy! (by kim14im)
Constructor multiple definition
 
Could someone please tell me why I'm receiving a multiple definition error. I simplified the code to a basic skeleton that still exerts the error. Its driving...
[3 replies] Last: So simple, thanks. I was becoming aggravated. (by kparker)
Arrays, vectors and lists, need a walk through pleaseeeee
 
Write a C++ console program to do the following: 1. Define an array of ints with the ten elements { 0, 1,2,3, 4, 5, 6, 7, 8, 9 }. 2. Define a vector<int> with...
[2 replies] Last: i need help developing, i m working on item 2 and 3, i am new to this ... (by Lasoquet)
IF statement - Error: expression must have integral or unscoped enum type
 
What am I doing wrong here? #include <iostream> using namespace std; int main() { for (double a = 600851475143 / 2; a > 0; a--) { if (a % 2 ==...
[4 replies] Last: Very cool, I didn't know long long was a thing! I am really new to th... (by bulba5aur)
Expression must be a modifiable lvalue
 
I keep getting this error. Can someone please tell me what im doing wrong. Thanks! I am trying to fill an array of struct door. //Read array. Put them in a ...
[6 replies] Last: if you paste a copy of your txt file. i will try to replicate your pro... (by rafae11)
Initialization of a static 2D member vector
 
Hi everybody. I know the size of my vector but I am failing initializing it the correct way. It sounds like a simple task, but yeah it doesn't work. test....
[4 replies] Last: Thank you, that is quite nice feature! (by omikron)
by amizam
problem in getting a correct name, the score is correct but it didnt match with the name..
 
#include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; const int NO_OF_CANDIDATES = 6; void readData(ifstream& ...
[1 reply] : foo.cpp:66:38: warning: unused parameter ‘subscript’ [-Wunused-pa... (by ne555)
returning class instance from a function
 
Is there any way to return a class instance from a function? class CLASS{...} CLASS func(){return CLASS(...);}
[15 replies] Last: Actually now that i think about it, is there any way to create an inst... (by Funkist)
Number conversion switch/end loop issues
 
I have two issues I cannot quite figure out in my program. The first has to do with the default case of the switch. As it is now the when the default case is tr...
[2 replies] Last: Well. . . how do you account for roman numerals like IX? The I needs ... (by PCrumley48)
November 2014 Pages: 1... 2223242526... 65
  Archived months: [oct2014] [dec2014]

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