if "fcfs characters.txt" is entered in the command line i have infile.open(argv[2]) to open the file which works correctly but how do i put argv[1] in an if statement? like
if (argv[1] =="fcfs"){do...
Type: Posts; User: AJOHNZ
if "fcfs characters.txt" is entered in the command line i have infile.open(argv[2]) to open the file which works correctly but how do i put argv[1] in an if statement? like
if (argv[1] =="fcfs"){do...
i have created a queue of stacks. i am supposed to remove the first item from my queue (which is a stack of two words) and then view the top word of the stack i just removed. i know that i can say...
code compiles and works if i dont have my cout statement. but when i try to cout the front and top element of queue it compiles but has that debug error
void wordTest(string search, string temp,...
i am creating a word ladder program. i have already written code to find all words in the "words.txt" file that are one letter different from the user inputted word. i am supposed to "find all words...
i dont think so. if this makes it easier to understand, i am supposed to find all words in "words.txt" that are one letter different from the user inputted word...
how do i find all words in "words.txt" that are one letter different from the user inputted word?
my problem is i dont know how to change every letter...that is my question...
basically i am supposed to change each letter individually of a five letter word entered from user and see if it is in my words.txt file. so for example if the user enters "tears" i need to check and...
i am supposed to write a function based off of the code i have so far that can generate the 5 letter sequences that are 1 letter different from a givin input; also identify the sequences that...
is this way correct?
#include <iostream>
#include <fstream>
#include <string>
#include <set>
using namespace std;
i am trying to read words from a file i have "words.txt" into a set. the code i have written compiles and prints to screen fine but my question is what makes something a "set"? i mean i named my...
no i dont really know overall how to apply programming. i have just recently learned c++ over the past year.
no i am not an advance coder AT ALL. i just want to make a vey simple program and just be able to see the results inside an application besides vb...something like if i type something then make it...
first off i am extremely out of my element here, i have no idea how this works or if it even can work at all so if i say something stupid forgive me i just think this would be fun. say i wanted to...
thanks for all the help sebasiani ive got it working now.
yes kya i agree. ok i insert at beginning of stack now with this code but how do i get my print function to work? i get a syntax error on the line that i pass ostream& to print function...
...
the error is in push declaration beside closing bracket...
#include <list>
#include <iostream>
using namespace std;
template<class T>
class Stack
{
ahhh thanks so much guys. never new newline stays in input stream after cin>>. nice to know.
when i ask user to input name number 1 it pauses like it is supposed to and allows the user to input their name. when it asks the user to input name #2 it skips right into the loop and displays...
how do i figure out where each new word starts using code?
I know that i could use a string data type but please don't give that as a solution because strings haven't been covered yet in the book. when i print out the array now, only the first word that is...
so here is my code knowing the number of numbers in the file...
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
"Write a program that asks the user for a file name. assume the file contains a series of numbers, each written on a separate line. the program should read the contents of the file into an array, and...
here is my attempted code so far but i have no idea to declare/read in for an uspecified sized array
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
Debug Error!: Run-time check failure #2 - stack around variable 'infile' was corrupted.
weird info about this problem - the book says the file should be called RainOrShine.dat but my computer...