Written a code that parses through a file reading

Assignment Help C/C++ Programming
Reference no: EM13168429

written a code that parses through a file reading it line by line and splitting it into tokens by white space. But I want a pair of single quotes to be one token, not how many words are in it,

For example I want something like

Done a'ccept command' Done

to be three tokens not four the three bieng

first Done second a'ccept command' third bieng Done.

So far I have

void file_parser::check_quote(tokens<v>) {

boolean has_quote;

for (int i = 0; i <= tokens.size(); i++) {

String temp = tokens.c_str();

for (int i = 0; i <= tokens.size(); i++) {

if (tmp[i] == '\'') {

has_quote = true;

int FirstQuote = i;

}

if (has_quote && i != FirstQuote && tmp[i] == '\'') {

int SecondQuote = i;

for (int k = FirstQuote; k <= SecondQuote; i++) {

}

}

}

}

 

 

Reference no: EM13168429

Questions Cloud

Short memo to the vice-president of production : Write a short memo to the vice-president of production recommending whether the availability of any of the three resources (blending, purification, or labor) should be increased from current levels. If you recommend an increase, specify at most ho..
What are the solute particles present in aqueous solutions : Methanol, CH3OH, is a nonelectrolyte; acetic acid, HC2H3O2, is a weak electrolyte; and ammonium chloride, NH4Cl, is a strong electrolyte. What are the solute particles present in aqueous solutions of each compound? (Select all that apply.)
How many grams of water should theoretically be produced : If 6.01 grams of Nh3 reacts completely, how many grams of water should theoretically be produced?
Shortage of resilience research on canadian aboriginals : Write an essay of 500-750 words. Be sure that you are presenting the concepts in your own words and that you include current information.
Written a code that parses through a file reading : written a code that parses through a file reading it line by line and splitting it into tokens by white space. But I want a pair of single quotes to be one token, not how many words are in it
Show your work for the reduction : Find the complement of F(A,B,C) = AB + ( BC' * A) and reduce it. show your work for the reduction using the axioms of boolean algebra. then, implement the simplified expression using AND,OR and NOT gates
How can we use both karnaugh maps : How can we use both Karnaugh maps and DeMorgan equivalences to better understand systems we build?
Calculate the ph of each of the following solutions : Calculate the pH of each of the following solutions.
What is the mass of the water : A source of energy releases 3000 calories. This changed the temperature of a mass of water from 25 C to 55 C. What is the mass of the water?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Longest increasing subsequence problem

Write a computer program to solve the Longest Increasing Subsequence problem.Your program should read input from a text file (one value per line

  Brownian motion is a physical phenomenon

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Program that takes a number between

Write a program that takes a number between -121 and 121 and output that number in the format of power of 3 (1,3,9,27)example:13 = 9+3+1

  Write c++ program to create a bar chart showing the average

Write a c++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013.

  Write a program to calculate a person''s net pay

Write a program to calculate a person's net pay after subtracting federal income tax.The program should ask the user to enter the person's name, social security number, gross pay, and the number of dependents.

  Two types of constructors

Explain what constructors do and when they are executed. Explain the two types of constructors. Provide an example class that includes both types of constructor functions and demonstrate how an object would be instantiated using both types of constru..

  Include the iostream, fstream, string, and cctype libraries

1. Include the iostream, fstream, string, and cctype libraries in your program.

  First display the smallest volume and then the largest volum

first display the smallest volume and then the largest volume.

  Binary tree, print right view of it

Given a Binary Tree, print Right view of it. Right view of a Binary Tree is set of nodes visible when tree is visited from Right side.

  Take an n x n matrix, and create a new, (n-1) x (n- 1)

take an N x N matrix, and create a new, (N-1) x (N- 1), matrix with each element being the sum of four nearby elements. You need to figure out a way to break the matrix up into squares and iterate through the matrix, while staying within its bounds.

  Structured programming using procedural languages

A a program that is called "Playing with Numbers or Letters".

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd