Hello. I'm taking subject compiler construction. and there is a question and the answer that i don't anderstand. if it was digit -> [0 - 9] then it would be ->0->1->2->3->4->5->6->7->8->9 final state digits -> digit+ then it would be ->digit->digit->digit loop final state but this question i dont understand the solution: write a transition diagram for scientific number number → digits (. digits)?(E[+-]? digits)? the answer: http://imgur.com/a/98551 my question: why is there a loop before the period? The dot . between 13 and 14, does the period mean something? why is there a loop at 15? is it because …

Member Avatar
Member Avatar
+0 forum 2

Hi everyone. I am makng a RISK game and I am working on a territory class here, and I got a strange message that my google searches have not shed any light on. My code is below. First, my header file: // Class represents each individual territory on the map #ifndef Territory_hpp #define Territory_hpp #include <string> #include <vector> #include <array> #include <map> using std::string; class Unit; //forward declaration of class unit //////////////////////////////////////////////////////// class Territory { public: //CONTINENTS represents the index of the contninents in the corresponding vector ALL_BOARD_TERRITORIES //client classes can also use CONTINENTS to initialize a territory enum CONTNINENTS …

Member Avatar
Member Avatar
+0 forum 2

I have a Toshiba Satellite P55W-C running 64-bit Windows 10 Home. I bought it new less than a year ago. I am the only user. It has an Intel Core i7 CPU, 8 Gigs of RAM, 2.4 GHz. I'm generally surfing the web and streaming audio/video. I'm not a gamer and I'm not running any servers on this computer, so it seems to me that I have more than enough resources to avoid any slow-down of the streaming video/audio. Normally it keeps up just fine, with the following exception. I've been coding using Android Studio. When I compile/install apps to …

Member Avatar
Member Avatar
+0 forum 6

Hi, I was wondering if anyone could help me or point me in the right direction. Iv been developing a source to source compiler for some time, so one language being translated to C++/C. Now the source has been translated i wish to package a windows and linux c++ compiler with my application, preferably as a standalone binary in a local directory rather than a full system install IE. -My application Directory -My application binary.exe -compiler my application will use -Mingw.exe -g++.exe However so far the only compiler i can find binary distributions that dont require me to perform a …

Member Avatar
+0 forum 0

I'm sorry I keep having these strange problems but there's little I can do about them, they are unpredictable. I managed to fix the last one and I've been able to compile and run my programs. Now however I've run in to the *strangest *of problems, the one described in the title. I've set breakpoints in the constructor call and the header I created; and the program just skips past everything and straight to return. I have a picture: ![ProgramSkip.GIF](/attachments/large/4/361e7aa7e6b6f2f0076ea0cb116be8f0.GIF "align-center") My code does some cout statements in the header (for debugging) so there should be something in the command …

Member Avatar
Member Avatar
+0 forum 4

I've essentially copied a small project from another computer to this one. This one is running windows 8.1. What happens when I try to compile even a hello world cpp project I get this error: 'Fatal error: "iostream" No such file or directry' . I know this means the compiler cannot find the file where it is searching. But why? I'm using CodeBlocks with MingW on both computers. Hello world and my project compiler just fine on the other one, yet I have never been able to get even a hello world to work on this Windows 8.1 machine. I …

Member Avatar
Member Avatar
+0 forum 6

I continuously get this warning whenever a constructor delegates to another constructor within the containing type, having virtual bases. `warning C4100: '$initVBases' : unreferenced formal parameter` It's the same warning as when a parameter or local goes unused, it in this case it seems to be referring to the virtual bases to initialize, but in this case, still makes no sense. I'm using Visual C++ Compiler 12.0.

Member Avatar
Member Avatar
+0 forum 3

[ATTACH=RIGHT]22389[/ATTACH]CodeToGo is, essentially, an API wrapper around the Ideone.com online compiler and debugger that enables you to use it to compile and run code in around 50 different programming languages on your iPhone or iPad. It has been around for a while but has always been somewhat tarnished with the 'toy' label courtesy of a total inability to load or save code snippets, requiring you to type them in manually. Actually that wasn't quite the case either, although many thought it to be, as you could always use the ideone.com site to email the code snippets. However, this latest app …

Member Avatar
Member Avatar
+3 forum 3

Hello programmers! I have been working on STL algorithms for some time now as a beginner, and I started doing an exercise, among which is the task of `use the fill algorithm to fill the entire array of strings named items with "hello"`. My code for this is below: // Various statements in exercise in using STL Algorithms #include <iostream> #include <algorithm> #include <iterator> #include <array> using namespace std; int main() { //various statements in using STL algorithms ostream_iterator<int> output(cout," "); //iterator const size_t SIZE=10; array<string,SIZE> myStrings; //array of empty strings fill(myStrings.begin(),myStrings.end(),"hello"); //using the fill algorithm to fill the entire …

Member Avatar
Member Avatar
+0 forum 6

Hello please i have a problem with my compiler. When ever i try compiling a program it gives me warning saying" Source code not compiled" I use Devc++ compiler. Do i change the compiler or what do i do? This is the program i typed in it

Member Avatar
Member Avatar
+0 forum 4

i want to create a online compiler website but how to build a different compiler at one site with eaisy coding ..pls suggest me the proper solution

Member Avatar
Member Avatar
+0 forum 1

Hi, I want to know how do i write the grammer for the program below in JavaCC. app(name : 'First App') { View(id: top) { Label(id: l1, text: 'Hello') Button(id: b1, text: 'Press') Button(id: b2, text: 'Exit') } } appreciate a reply thanks

Member Avatar
Member Avatar
+0 forum 1

I have Clipper Compiler Ver 5.0, also an older version. I used the earlier version along with dBase III+. I still have both but cannot remember the command to compile the PRG files from dBase III+. I look for and OBJ file after typing Clipper <mymainprgfile>. I don't know if I'm missing a switch or something. When the compile has completed I would use PLINK86 <mymainprgfile>. I am not generating and EXE file like I used to. Does anyone have the documentation the from or what commands I need to compile and link using Clipper from Nantucket?

Member Avatar
+0 forum 0

I am using the gcc compiler and I am new to using flags. Can any one tell me a source for it. e.g. I wanted to use *-funroll-loops* but I dont know the proper syntax. Can any one help.

Member Avatar
Member Avatar
+0 forum 4

i am using turbo c++ 3.0 but it has not good graphics.i try visual studio and dev c++ but its syntax is changed. i want a compiler that has same syntax like turboc++. plz name it and give me a dowload link for 64bit os.

Member Avatar
Member Avatar
+0 forum 2

Hi all, So i was just wondering what would be the best software to use to program in C++ and then compile the program. So could you please name any software packages that you know of which can help you to program in C++ and if you could also state if they are free or how much they cost. Thank you

Member Avatar
Member Avatar
+0 forum 6

Hi, recently I have wanted to learn how to write Windows native binary code to make a binary script which in one form or another will display hello world. I am hoping to eventually create a more efficient compiler using this method but as you should understand already, this is a rather undocumented section of programming. So basically I need to know for the gcc compiler, how did they manually set the ones and zeros in accordance to the execution environment when you need to know how the execution envirment executes binary. Like is there any docs for how windows …

Member Avatar
Member Avatar
+0 forum 3

Yesterday while browsing the web, I stumbled upon a blog where the author had written a post regarding what a computer scientist should know, in that list he had given links for further reading. One of these links was to a website [nand2tetris](http://nand2tetris.org/) where the goal is supposedly to build a modern computer from first principles! This seems very interesting to me, and I would like to ask whether anyone here has tried, or would recommend this project. In a video he says it could be completed in 12 weeks, is this an accurate estimate? If so I would perhaps …

Member Avatar
Member Avatar
+0 forum 2

I'm afraid to ask this on SO because all I can get is down-vote so I ask it here.* ## **Question:** ## Does C/C++ compiler (e.g the popular "gcc") with OO concepts allocates/creates all data member if other data member are not in use? /************************************* * code for example: * ************************************** typedef std::size_t Int; class Rectangle { public: Int x; Int y; Int width; Int height; Int border_top; Int border_right; Int border_bottom; Int border_left; } //suppose I instantiate many of this class then call "some" data members Rectangle rect1, rect2, ...; rect1.x = 0; rect1.y = 0; //rect1.other_member arent called …

Member Avatar
Member Avatar
+0 forum 12

I have introduced an algebra for a new memory model. Now I need to implement this using Java. Basic step of my program is: Once we need to execute an application program (exe file), My program should accept that and classify it according to its functioning. do you have any suggetions for this in java code?

Member Avatar
Member Avatar
+0 forum 10

Hi, I'm wondering if anybody knows of a python compiler to make an exe with. I have tries cx_freeze and py2exe so far, but I haven't been able to get it to work. If anyone has any good python to exe compilers please post here. Thanks, 26bm

Member Avatar
Member Avatar
+0 forum 4

Hello I encountered following info at [this page](http://en.wikipedia.org/wiki/Call_stack#Overlap): For some purposes, the stack frame of a subroutine and that of its caller can be considered to overlap, the overlap consisting of the area where the parameters are passed from the caller to the callee. In some environments, the caller pushes each argument onto the stack, thus extending its stack frame, then invokes the callee. In other environments, the caller has a preallocated area at the top of its stack frame to hold the arguments it supplies to other subroutines it calls. This area is sometimes termed the outgoing arguments area …

Member Avatar
Member Avatar
+0 forum 1

Yes, I know what I'm talking about. which is Creating my own compiler to compile a language say C++,Java,Ruby, Python ..(Any one of them ofcourse -.- ) Actually, if I can just get the source code for an existing one that would be much better. [example] Say there's Turbo C ...is the source code available for it ? if so where? or any other compiler ..(Any language ,any compiler) I just want to poke around and see what happens(with the source code) ..I've done enough languages now I want to do compilers :)

Member Avatar
Member Avatar
+0 forum 3

I am learning about compilers right now and search for a source code in C as my guideline to better understand how it works. I found this online from this link [Click Here](http://www.programmersheaven.com/download/16060/Download.aspx) and the code is quite long. Even there are comments in the code, I still find it a bit difficult to trace/follow. I would appreciate it if someone can put more detailed comments in this source code to help me better understand it. Thank you very much! :) /* A tiny BASIC interpreter */ #include "stdio.h" #include "setjmp.h" #include "math.h" #include "ctype.h" #include "stdlib.h" #define NUM_LAB 100 …

Member Avatar
Member Avatar
+0 forum 4

I keep getting an error in my MoneyDemo class, it reads, "Method checkMoney in class Money cannot be applied to given types; required: no arguments; found int, int; reason:actual and formal argument lists differ in length" Also here is my list of objectives for the program which I'll be graded on, If you notice any other errors in my code which I may run into later please feel free to point them out for me! Use BlueJ to create a Money class with two integer instance variables, dollars and cents. Provide the following methods: 1. A two-parameter constructor that initializes …

Member Avatar
Member Avatar
+0 forum 6

Inside FileTwo.h #ifndef FILETWO #define FILETWO #include"FileOne.h" class FileOne ; class FileTwo { public: int Test(FileOne One){ return (One.var1+One.var2);} FileTwo(void); ~FileTwo(void); }; #endif Inside FileOne.h #ifndef FILEONE #define FILEONE #include"FileTwo.h" class FileTwo ; class FileOne { private: int var1 , var2 , var3 ; public : friend int FileTwo::Test(FileOne One); FileOne(){ var1= 12;var2 = 24; } }; #endif Inside main.cpp #include<iostream> using namespace std ; #include"FileOne.h" #include"FileTwo.h" int main(){ FileOne one ; FileTo two ; cout<<two.Test(one); } During compilation i got the following error 1-- error C2027: use of undefined type 'FileOne' c:\users\e543925\documents\visual studio 2005\projects\myproject\filetwo.h 2--error C2027: use of undefined …

Member Avatar
Member Avatar
+0 forum 5

Hi all, I am trying to learn java here, and having some difficulties with a very simple program that I am working on in an attempt to get a feel for what the language can do. This is my code so far: import java.util.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Test extends JFrame{ public static void main(String[] args){ JFrame box = new JFrame(); box.setTitle("Week1 test"); box.setSize(240,240); box.setVisible(true); box.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel label = new JLabel("Hello World"); label.setSize(160,160); label.setVisible(true); box.add(label); JButton B1 = new JButton("Exit"); B1.setVisible(true); box.add(B1); box.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ System.Exit(0);} });}} Unfortunately, whenever I try to compile …

Member Avatar
Member Avatar
+0 forum 4

Hello, I am using Code::Blocks, and recently any time I try to compile any program I get the errors "stray '\302' in program" and "stray '\206' in program" about every 20-30 lines. I know how to fix these (by deleting the non printing character(s) in the line in question) but I don't know how to prevent them. Does anybody know what is causing this issue? I am using the dvorak keyboard layout which is being emulated by my OS (IE using the language tools rather than a hard wired keyboard), but this never used to happen with that. It is …

Member Avatar
Member Avatar
+0 forum 2

Could someone please help me find out what the problem is with this simple program? This souldn't be happening. Here is the code: #include "stdafx.h" using namespace std; int main () { int numbers[5]; int * p; p = numbers; *p = 10; p++; *p = 20; p = &numbers[2]; *p = 30; p = numbers + 3; *p = 40; p = numbers; *(p+4) = 50; for(int n=0; n<5; n++) { cout<<numbers[n]<<", "; } return 0; } Here is the comiler error: *test.cpp(23): error C2065: 'cout' : undeclared identifier* I'm using Visual C++ Express Edition.

Member Avatar
Member Avatar
+0 forum 2

What is the best way to practice C++ coding on Windows 7, and at the very least free? I want to get better at programming, but I don't have a compiler.

Member Avatar
Member Avatar
+0 forum 1

The End.