Search Results

Search found 5015 results on 201 pages for 'compiler construction'.

Page 104/201 | < Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >

  • How is it possible to legally write ::: in C++ and ??? in C#?

    - by daveny
    These questions are a kind of game, and I did not find the solution for them. It is possible to write ::: in C++ without using quotes or anything like this and the compiler will accept it (macros are prohibited too). And the same is true for C# too, but in C#, you have to write ???. I think C++ will use the :: scope operator and C# will use ? : , but I do not know the answers to them. Any idea?

    Read the article

  • jquery datepicker in asp.net

    - by Abu Hamzah
    whats wrong with the below code, its throwing me an error of Compiler Error Message: CS1002: ; expected $(document).ready(function() { $('<%StartDate%>').datepicker({ showOn: 'button', buttonImage: '../images/Calendar.png', buttonImageOnly: true, onSelect: function() { }, onClose: function() { $(this).focus(); } }); }); <label for="sd">StartDate:</label> <asp:TextBox ID="StartDate" runat="server"></asp:TextBox>

    Read the article

  • c++ volatile multithreading variables

    - by anon
    I'm writing a C++ app. I have a class variable that more than one thread is writing to. In C++, anything that can be modified without the compiler "realizing" that it's being changed needs to be marked volatile right? So if my code is multi threaded, and one thread may write to a var while another reads from it, do I need to mark the var volaltile? [I don't have a race condition since I'm relying on writes to ints being atomic] Thanks!

    Read the article

  • A program that creates another program

    - by zaidwaqi
    Hi, I need to create a program that creates another program but not a compiler though. For example, I write a program that accepts a string input from the user. Let's say user enter "Pluto". This program should then create a separate .exe that says "Hello Pluto" when executed. How can I do this? If you could give example in C# and Windows Forms, it's better. Thanks.

    Read the article

  • Why isn't the boost::shared_ptr -> operator inlined?

    - by Alan
    Since boost::shared_ptr could be called very frequently and simply returns a pointer, isn't the -> operator a good candidate for being inlined? T * operator-> () const // never throws { BOOST_ASSERT(px != 0); return px; } Would a good compiler automatically inline this anyway? Should I lose any sleep over this? :-)

    Read the article

  • Good practice : compare a value with a boolean?

    - by NLemay
    Most of the time, I prefer to write this : if(isWelcome() == true){} if(isWelcome() == false){} instead of this if(isWelcome()){} if(!isWelcome()){} Because I feel that it is easier to read (but I do understand that it doesn't make sense). I would like to know if there is a common agreement about this practice. What most developer do? And I'm wondering if the compiler is doing the extra comparaison, or if it understand that it is useless.

    Read the article

  • sending input parameters to another function

    - by Pegah
    Hi everybody, I need to send the list of the input arguments to readInput function. But the compiler gives error when I call readInput function. Could you please tell me where my mistake is? bool readInput(netcorr net,int argc, char * argv[]); int main(int argc, char * const argv[]) { netcorr net; bool error=readInput(net, argc, argv); } bool readInput(netcorr &net,int argc, char * argv[]) { } thanks for your help. Pegah

    Read the article

  • C: performance of assignments, binary operations, et cetera...

    - by Shinka
    I've heard many things about performance in C; casting is slow compared to normal assignments, functional call is slow, binary operation are much faster than normal operations, et cetera... I'm sure some of those things are specific to the architecture, and compiler optimization might make a huge difference, but I would like to see a chart to get a general idea what I should do and what I should avoid to write high-performance programs. Is there such a chart (or a website, a book, anything) ?

    Read the article

  • F# constructor syntax - overiding and augmenting new

    - by Benjol
    I have a non-disposable class with Open/Close syntax that I'd like to be able to use, so I'm trying to inherit from it, and work the Open into the new and the Close into Dispose. The second part is ok, but I can't work out how to do the Open: type DisposableOpenCloseClass(openargs) = inherit OpenCloseClass() //do this.Open(openargs) <-- compiler no like interface IDisposable with member this.Dispose() = this.Close() (cf. this question which I asked a long time ago, but I can't join the dots to this one)

    Read the article

  • Debug vs Trace in C#

    - by koumides
    All, As I understand statements like Debug.WriteLine() will not stay in the code in the Release build. On the other hand Trace.WriteLine() will stay in the code in the Release build. What is controling this behaviour? Does the C# compiler ignores everything from the System.Diagnostics.Debug class when the DEBUG is defined? I am just trying to understand the internals of C# and just curious. Thanks, MK

    Read the article

  • getting started with Google Closure if you don't compare about minifying/compiling?

    - by Tim
    If you don't care about minifying your code, is there a way to get started using the Google Closure library without having to set up a subversion client and use the compiler? The Notepad sample program on Google's website refers to <script src="closure-library/base.js" > </script > Can you simply download closure-library/base.js somewhere and start playing with the UI examples? The Closure Lite quick-start version doesn't appear to include goog.ui

    Read the article

  • problem in printing floating point

    - by kudi
    hi I am using IAR c compiler, I am trying to print floating point value like printf("version number: %f\n",1.4); but I am always getting like below in console version number:ERROR help please thanks in advance kudi

    Read the article

  • Objective C: Class Extensions and Protocol Conformation Warnings

    - by Ben Reeves
    I have a large class, which I have divided into several different class extension files for readability. @protocol MyProtocol @required -(void)required; @end @interface MyClass : NSObject <MyProtocol> @end @interface MyClass (RequiredExtension) -(void)required; @end Is there a better way to do this, without the compiler warning? warning: class 'MyClass' does not fully implement the 'MyProtocol' protocol

    Read the article

  • How can I put quotes in a string?

    - by riad
    I need to write a string literal to a text file, but the C# compiler finds errors when I use quote characters in it. My current code: writeText.WriteLine("<?xml version="1.0" encoding="utf-8"?>"); I need the output for the text file to be: <?xml version="1.0" encoding="utf-8"?> How can I put quote characters in strings in C#?

    Read the article

  • initializing a readonly property. Object c

    - by tak
    i was trying to create a property which is readonly. i wanted to initialize with a value from the class creating an instance of this class.e.g @property (readonly) NSString *firstName; And wanted to initialize it like -(id)initWithName:(NSString *)n{ self.firstName = n; } Once i do this, this compiler shows an error that the readonly property cannot be assigned. So how can i do this?

    Read the article

  • How can I write a "Hello World" app in assembly language?

    - by SLC
    I've often heard of applications written using the language of the gods, assembly language. I've never tried though, and I don't even have a clue how to do it. If I wanted to dabble, how would I go about doing it? I know absolutely nothing about what is required, although presumably some kind of compiler and Notepad. Just purely out of curiousity, what would I need to write a "Hello World!" application?

    Read the article

  • in vb.net an error is coming

    - by user275111
    Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). in vb code-i used namespace and a class.

    Read the article

  • How to make a macro which gives back a string into the source code?

    - by mystify
    Example: I want to do this: METHODNAME(5) { // do something } which results in: - (void)animationStep5 { // do something } Is there any way to do this? Basically, what I need is a way to generate a real source code string before the program is compiled, so the compiler does see - (void)animationStep5... Or maybe there's something different than a macro, which can help here to auto-generate method names (not at run-time)?

    Read the article

  • What the reasons for/against returning 0 from main in ISO C++?

    - by Maulrus
    I know that the C++ standard says that return 0 is inserted at the end of main() if no return statement is given; however, I often see recently-written, standard-conforming C++ code that explicitly returns 0 at the end of main(). For what reasons would somebody want to explicitly return 0 if it's automatically done by the compiler?

    Read the article

< Previous Page | 100 101 102 103 104 105 106 107 108 109 110 111  | Next Page >