- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I'm doing a program, and trying to find the @, going back to the beginning to search for valid characters, and when I find an invalid one I move it forward to valid one. Same goes for the end, except just leaving it at the invalid character. My program compiles, … | |
I'm not sure what I'm doing wrong. I get a warning when I compile and an error after my program runs. This is the warning I get: myList2.cpp: In function ‘int main()’: myList2.cpp:96: warning: deleting array ‘int score [6]’ And this is what shows after my program runs: a.out(7023) malloc: … | |
I started this code, and it does encode the text, however it only does the first line of text and repeats it. It is also encoding spaces. #include <fstream> #include <iostream> #include <string> using namespace std; int main() { ifstream fin; string fileName; cout << "What file do you want … | |
I have it all written, and it works. However, I have to enter a value and it brings the prompt up again. When I enter the value in the second time, it plays the game. I always have to enter the value twice to get it to work. I'm not … | |
I just have a quick question, I tried to figure this out from my textbook but can't seem to find it. j = 5, i =7 Evaluate (++j == i) + 3 How does C evaluate the expression? To me, it just doesn't make sense. I'm not looking for the … | |
I am trying to find the longest common prefix of two words entered by the user. I don't understand what is going wrong. I keep getting this error when I compile: [CODE]prefix.c:11:13: error: expected declaration specifiers or '...' before '(' token [/CODE] And this is my code: [CODE]#include <stdio.h> #include … | |
I'm trying to search a text file for any email addresses. I'm trying to get it to print the line that every @ sign appears in. However, it is only printing the @ sign instead of the whole line. And I don't understand why. [CODE] //gathering emails string Emails; int … | |
I'm just wondering if someone could point me to some sources on linked lists. I'm trying to make it so the user inputs how many they want to add to the list and the list will stop after that amount. I'm just looking for some examples on it to help … | |
First off, I know I have a few other errors besides the sorting code. I am working on figuring those out as well. I need to sort the names in the file alphabetically. I did put a code which I thought would work, but doesn't. Lines 39 through 50. [CODE] … | |
I'm making a student database using array based lists. I'm having trouble with making the list size created by the user. I have a for loop there now but once I put it there, I get an error saying aStudent is an undeclared variable and I don't understand why. There … | |
I'm trying to create a print void function, however I'm not understanding how to call the database in the print function. I've tried to do something similar to what is in my textbook but all I'm getting is errors. This is what I've done so far. [CODE] #include <iomanip> #include … | |
I'm trying to get what I put in the value for the database to output, however whenever I use a cout statement with the a.name I get an error on line 21 which is the line with the cout statement. I've done it the way it is in the examples … | |
For my class, I am creating a rock paper scissors game. My code is not all the way done, but I am stuck on a certain part of the process. For some reason, I am getting errors on the "==" in: [CODE] while (true) { human = humanChoice(); computer = … |