No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
OK - I'm stumped I'm filling a 2D arraywith inputs, then when it hits the first function - for some reason the very first value in the array is being changed to -5 If I comment the function out, it's fine - it gets passes and passed back with no … |
|
Can you initialize (easily/simply) a vector with multiple values? Like an array:`int fu[] = {1, 3, 4, 5, 6}` |
|
Nothing special - I just need to grab a line and slap it into a string - if(found == 1) { cout << "\n\n Please enter a new location for this event: \n"; getline(cin,newAct); cout << "New Account: " << newAct << endl; } else { cout << "\nEvent not … |
|
I'm new to using vectors, and I'm trying to declare a vector with size 1: vector<string> activities(1); I get an error with this code, can anyone explain why? G:\ManageActivities\Activity.h|11|error: expected identifier before numeric constant| G:\ManageActivities\Activity.h|11|error: expected ',' or '...' before numeric constant| |
|
My instructor provided this class for us to use. He hasn't answered the e-mail I sent, and this is due soon. I keep getting an error. I haven't touched the file, just included it. G:\ManageActivities\Date.h|23|error: 'string' does not name a type| #ifndef DATE_H #define DATE_H #include <string> #include <sstream> class … |
|
I'm trying to run a program with command line arguments. I keep getting the following error: This application has failed to start because libgcc_s_dw2-1-.dll was not found. Re-Installing the applicatiob may fix this problem. I have no clue what to do with this. The code works on the school computers … |
|
When I dynamically allocate mem within a function, do I have to still manually release it? Or does it go away once the function has run and returned (like local variables)? If I do have to release it, since it's basically a pointer can I do that from main? Do … |
|
This is driving me nuts. I'm writing a password program that reads from .txt file into an array of char arrays, and then allows the user to write a new password and then appends it to the end of the list. Everything SEEMS to be working except everytime I run … |
|
I'm writing a program to parse a user entered string. My textbook does not include the .find() function, but I found it in an old C++ book (Ivor Horton's Beginning C++, the Complete Language) is the .find() considered bad, or depricated? It seems to work really well, but I don't … |
|
I've hit a wall. I'm trying to open a .txt file and then copy it's contents into an array of character arrays. Can someone point in me in the right direction. I've been at this for about 2 days now and haven't made any head way. Below is a sample … |
|
I'm writing a program that stores passwords into a char array then checks for 1 upper, lower, number and allows @ - _ . For some reason it won't read the special chars - unless I include this function, but when I do it only evaluates those in the function, … |
|
When a user enters multiple keystrokes the meny prints multiple times. It should spit out an error and reprint the menu once...what gives? void mainMenu(char entries[], int index[]) { char choice; cout << "Please choose 1, 2, or 3.\n"; cout << "1. Save a new password\n"; cout << "2. Display … |
|
It's giving me an error telling me my reference variable hasn't been initialized. What does that mean, what's wrong with my code here? /* ------ FUNCTION: NEW ENTRY ------------------------------------ ----------------------------------------------------------------*/ void newEntry(char entries[], int index[]) { char buffer[256]; char password[8]; bool val = 0; int &length; cout << "\n------ New … |
|
This is just a simple menu and I have no clue why it doesn't work. using namespace std; #include <iostream> #include <iomanip> #include <fstream> // ------ Prototypes --------------------------------------------- void mainMenu(); void newEntry(); void display(); void exit(); // ****** MAIN *************************************************** int main() { mainMenu(); return 0; } /* ------ MAIN … |