C++ :: Text Editor Printing Algorithms?

Mar 26, 2013

They should apply for: backspace, return, regular char input, vertical scrolling. There is only one buffer, and it is not allowed to side scroll past max col, instead it must scroll down, appending the line cur_y + 1.

View 4 Replies


ADVERTISEMENT

C# :: Add Line Numbers To A Text Editor

Jun 7, 2012

I'm trying to add line numbers to a text editor I'm building but not having much luck. I'm trying to find a way around building something massive with a picture box next to my textbox etc. I'm tried adding VS Basic to my references and searching for the linenum_rtf.cs but I can't seem to find it under existing items.

View 4 Replies View Related

C/C++ :: How To Write Plugins For Text Editor

Nov 21, 2013

I want to add plugins like line numbering, syntax highlighting,code coloring,text alignment in a text editor. How i start including them?

View 1 Replies View Related

Visual C++ :: Making A Text Editor

Oct 24, 2013

when making a text editor do you have to create a parser for it or are parsers just used in compilers and interpreters?

View 6 Replies View Related

C++ :: Find And Replace Function For Text Editor

Jan 3, 2013

I'm building a find and replace function for my text editor I'm building the function without support from the algorithm header.

The function is written like: doc.find_replace("Word_to_be_replaced", "The_word_that_is_replacing"); I find this very easy to understand replace this, with this.

find_replace will both have char * as their arguments.

The problem I'm having right now if I replace a bigger word for a smaller word how do I delete the extra characters from memory.

So if I replace "Goodbye" with "Hello" how do I delete the last two characters? So I don't print garbage code.

View 1 Replies View Related

C/C++ :: Linked List To Simulate Text Editor

Mar 10, 2015

I am trying to make a text editor in C++ that uses Linked Lists as the main driving force. I need to make a program that can add a line of text at a certain point, delete a certain line of text, print the entire text, and quit and save the text to the original text file inputted from the shell script. My problems are with the cpp file, and the linked list files. My remove function is not what I need it to be I know that. I also know that there are some problems with my cpp file myEditor. My code is below.

#include <sstream>
#include "linkylist.h"
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
int main(int argc, char *argv[]) {
//node* head = new node;

[Code] ....

View 6 Replies View Related

Visual C++ :: Doubly Linked List And Basic Text Editor

Sep 23, 2014

I'm supposed to make a basic text editor using a doubly linked list, I have pretty much written most of it but keep coming across several problems. In certain places,all marked in the code, I get the error "expected a declaration" ive looked online and nothing ive found works. And secondly I also get the error" declaration has no storage class or type specifier" but i havent been able to find anything that works either.

Code:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <assert.h>
#include <string>

[Code] ....

View 6 Replies View Related

C++ :: Printing Text With Functions

Feb 27, 2014

Any way to make a function that prints something. i wanted to make a function for

Code:

cout << " PAUSE MENU " << endl; cout << " 0. Resume Game " << endl;
cout << " 1. Commands " << endl;
cout << " 2. Controller Setup " << endl;
cout << " 3. Bottles of Beer " << endl;
cout << " 4. Quit " << endl;
cout << " What is your Choice - ";
cin >> userinput;

So i wouldn't have to retype it again in the loop, i would just call the function. but it seems whatever i try it doesn't display the text. i've tried making a function with no return time like this " Void Pausemenu(); " but that just goes blank.

Code:

#include <iostream>
using namespace std;
//This function displays different results based on the users input
int menu(int menuchoice);
int main()

[Code] ....

View 4 Replies View Related

C++ :: Printing From Open Text File?

Nov 14, 2013

I need to create a text file that looks like:

first line
second line
third line
forth line
fifth line
sixth line

I want to replace the third and forth lines with three new lines. The above contents would become:

first line
second line
new line1
new line2
new line3
fifth line
sixth line

How can I do this using c++?

never was taught file function in c++

View 3 Replies View Related

C/C++ :: Reading Strings From A Text File And Printing Them

Feb 26, 2015

I need a program that reads the number of lines of a file and then several (max of 20) lines of text from a .txt file so an example of the .txt file is: 2 This is the first string This is string number 2 So it first reads the 2 and then reads the two lines of text. It stores the text in an array of pointers. The code i have so far is:

#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>

[Code].....

It doesnt give me any errors but all it does is keep running and doesnt print anything out kind of like its in an infinite loop although i dont see how that could be possible.

View 1 Replies View Related

C++ :: Some Algorithms For Compressing Images?

Feb 16, 2014

RLE(Run Length Encoding)
using namespace std;
class Bitwriter{
private:

[Code]....

View 1 Replies View Related

C/C++ :: Analysis And Evaluation Algorithms?

Mar 25, 2015

#include <iostream>
#include <vector>
#include <list>

[Code].....

The problem is it's not finding the shortest path.

View 1 Replies View Related

C :: Time Scheduling Algorithms Program

Jan 20, 2014

I am an IT college student and this is a self-assigned project i have done in an attempt to learn programming in C AND at the same time how time scheduling of an OS works (Both done in order to prepare for upcoming semester exams) using FCFS ,SJF, RR and PS algorithms (planning on adding SRT too sometime soon). (took me 9 hours total work time including validations). What i wanna know is from more seasoned coders if i am on the right track. *cross fingers*

Code:

#include <stdio.h>
#include <stdlib.h>
#define P_Q 1000

int main(int argc, char *argv[])
{
float min_value,
}

[code]....

View 11 Replies View Related

C/C++ :: Sorting Algorithms And Comparison Count

Jan 30, 2014

I am trying to count the number of comparisons for each of the following sorting algorithms, Selection, Insertion, Bubble, Merge, and Quick sort. This is using an array of numbers that are sorted, reversed, and randomly arranged.

I currently increment the "number of comparison" variable before every conditional statement that compares two numbers and am getting the following results:

Number of Items in Array = 100
Selection: random = 5049; reverse = 5049; sorted = 5049;
Insertion: random = 2640; reverse = 5049; sorted = 99;
Bubble: random = 9207; reverse = 9900; sorted = 99;
Merge: random = 1221; revere = 988; sorted = 1028;
Quick: random = 690; revere = 587; sorted = 636;

View 1 Replies View Related

Visual C++ :: Analysis And Evaluation Algorithms

Mar 25, 2015

Undirected graph G = {V, E} is given by the list next to the DS. Let u, v of V. Construction of two paths algorithm A1 (u, v) and A2 (u, v) such that no edge in common and have the shortest total length.

View 1 Replies View Related

C++ :: Multi-level Algorithms For Date-driven Scheduling

Apr 18, 2012

What is Multi-level algorithms for date-driven scheduling?

View 8 Replies View Related

C# :: Simple Map Editor In Winforms

Mar 20, 2014

I want to create a simple map editor in winforms. I would like for it to use a tile sheet from the user which they then can click on tiles from it and place it on the specified grid. Then export this as a binary file. Or perhaps it would be easier for the user to chose the grid size then have each grid space's number be able to be changed like 01,02,03 to represent an image. Then export this as a binary.

View 1 Replies View Related

C Sharp :: UI Type Editor In WPF?

Jun 13, 2012

I'm working on WPF project and There is this problem with property grid control. Here I saw the similar problem solved in windowsform project. how I can accomplish this behavior on WPF.

View 1 Replies View Related

C++ :: Output Compiled Script Into Binary File - Scripting Tool Algorithms

Dec 25, 2014

I am working on a script compiler that must output compiled script into binary file. Compiling etc is not a problem. The problem is detecting some specific cases. Nothing seems to work. If it works, then it breaks as soon as i modify the script.

Here is example "script1":

Code:
1VAR1 c1 = 44
2VAR2 c2 = 66
3beginscript
4if(c1=44)
5do_nothing

[Code] ....

Second example "script2", when there can be also some command between ENDIF and ENDIF. In this case: do_nothing command.

Code:
1VAR1 c1 = 44
2VAR2 c2 = 66
3beginscript
4if(c1=44)
5do_nothing

[Code] ....

The INDEXES before each line are not in actual script. They are just to point YOU to specific lines. Although the INDEXes are in compiled script!! This is very important. As you see there can be simple IF_ENDIF and nested (more complex) IF_ENDIF.

i.e IF_ENDIF inside another IF_ENDIF.

There are also IF_ELSE_ENDIF and some other ones, but im trying to make simple IF_ENDIF work first.

ENDIF is "SPECIAL" command, the IF, DO_NOTHING are "usual" commands.

"Usual" commands must always jump over(!) the ENDIF. ALWAYS!!

They must "ignore" them!

One strong RULE is like this for usual commands: always jump over any ENDIF, not matter what. If there is one, two or more ENDIF's in a row, then just jump over them to the closest NEXT usual block command. If there is some "usual" block command between multiple ENDIFs, then jump to this command and this command must therefore check whats next command right after it. And do the same: check if next command is ENDIF, if yes, jump over it, until "usual" block command is found.

This is the place im stuck. When i some time ago thinked about some ideas, i saw some patterns. One of them was that: Seems like if its nested IF_ENDIF, then every usual block command jumps out of it, i.e. right after the final ENDIF of this current nested IF_ENDIF.

But as soon as i added do_nothing between the two ENDIFs the so called "pattern" broke. In script2 above you see index 11 is do_nothing. Ok its in nested IF_ENDIF it should jump out to command index 17. But no, because there is do_nothing between index 13 and 16. If we jump out at index 11, the command 14 would never execute. This is a BIG NO. One idea i was thinking and trying was to use STL::FIND, STL::FIND_IF to find next "usual" command after specific index. But my code seems to crash sometimes and not work always.

Code:
bool NextNonENDIF(int i) {
return (i!=98);
}
int findNextBlockCmd(vector<int>&vec, int curidx)

[Code] ....

Here i pass him the vector that contains all the command TYPES in current script. Each command has its own TYPE or better called unique ID in which way compiler knows what is what. So in this case im trying to find a command thats NOT "ENDIF", in other words im trying to find next usual command after specific type of command. Lets just say the TYPE or unique ID of do_nothing is 555, im trying to find it.

How i should continue with this? What to use maybe stl::stack, some custom command indexing, some sort of labelling for usual commands in nested IF_ENDIFs or what?

In general, look script2, and i ask: There is index 11, this guy should look if there is any usual block command left for him before the final ENDIF at index 16. If there is, jump to it. If there is none, jump out of this nested IF_ENDIF to index 17.

Question: how to do it? What algorithms to use? I can use STL, BOOST, whatever. And i can use C++11.

View 1 Replies View Related

C++ :: Game Editor - How To Make A Rectangle Selection Tool

Dec 20, 2014

I'm working with a game editor program, where the player can create their own maps. Right know I'm working with collisions, and since it's unpredictable where the player place the objects like trees, houses and cars...etc have I an idea with making a rectangle selection tool. Where the player can drag a collision box around the object, so the sprite stops when it hits the box. The problem is that I dont know how to make a tool like that. so my question is how do I create a tool like that (see picture under for more information)?

btw I'm using the SDL framework

here is a picture that illustrate the tool I want to create: [URL] ....

View 4 Replies View Related

Visual C++ :: Resource Editor Failed To Initialize ActiveX

Feb 27, 2014

I'm working on a project which consists of several ocx loaded by one exe. The platform is WinCE. Now I'm on a process to create a new ocx. I do have a copy of those ocx projects in Win32 platform. These Win32 versions were only used to register ocx in local system and then put those on to application dialog by 'Insert ActiveX'.

Now the problem is those Win32 projects are so outdated, and unable to build. Getting too many linking errors to be solved.

I have build the new ocx and link that with exe manually by editing .rc file and all. But still no luck. New ocx is getting registered in WinCE device but failing to start application.

View 6 Replies View Related

C/C++ :: Program That Opens Text File And Checks Usernames Listed In Text Files?

Jun 5, 2014

I want to make a program that opens a text file and checks the usernames listed in the text files to see if the names are registered on a site such as twitter. How easy would this be to make, what things would I need to know?

View 4 Replies View Related

C++ :: Getline - Get Text File And Read Only First 100 Lines Of Text Content

May 31, 2013

I am trying to get text file and read only first 100 lines of the text content using c/c++. how can i do it?

is it something like string line;
getline(stream,line);

??

View 7 Replies View Related

C++ :: Filter Text Enclosed In Specific Tags From Text File?

Aug 30, 2013

I have a huge text file in following format:

{Bunch of text
.
.
}

[Code].....

I want to extract Text1, Text2, Text3, Text4,..., Text600 in the output file. How can i achieve this?

/* BTW, I am not getting my homework done here. I am an ex-programmer, who has now moved to marketing for some time now, and today, I encountered this problem, which I believe can be solved easily through programming. */

View 3 Replies View Related

C/C++ :: Delete Text From File And Than Shift The Rest Of The Text Upward

Aug 31, 2014

i want to create 100 gmail accounts instantaneously....what i want from you guys is i have written a program that create a text file i want that once i give the program the imput of 1 it should delete the first 3 lines from the file i.e. the first account details coz that is already been created and shift the rest of it 3 lines upwards after that i'll write a javascript that will automatically fill and create the accounts with those names in web browser.....my lil program is here:

#‎include <stdio.h>
#include <conio.h>
main()

[Code]....

View 1 Replies View Related

C++ :: Program To Convert Normal Text To Mobile Text

Mar 26, 2013

Program that reads in a normal text file and converts it into mobile phone text. that is if the word is 3 characters or less then ther is no changes to the word and if the word is four or more letters then remove all the vowels from the word except for vowels that are capitals.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved