• Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in One simple question to refresh back ur skills.

    It stops working because you have no code in those sections. If you choose 'B' you will execute this code: else if (choice== 'B' || choice=='b') { } Which of …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Issues With UDP Sockets in Game Engine

    Hello, I am having a bit of an issue with my networking addition to my game engine. The engine uses SDL to provide an event-driven programming environment. I tried adding …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Convert C++ to Javascript

    I'm the same way with javascript, I find it very hard to get anything done. However most C++ constructs do exist in javacript, including multidimensional arrays, for loops, etc. You …
  • Member Avatar for Labdabeta
    Labdabeta

    Created C++ with Wt vs Node.js or other for web server

    Hello, I am working on a moderately large web development system and have been charged with developing the server-side application for the web site. As a primarily local developer I …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Extremely Light-Weight C Graphics Library

    Hi. I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) …
  • Member Avatar for Labdabeta
    Labdabeta

    Revoked Solved Status for Extremely Light-Weight C Graphics Library

    Hi. I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Extremely Light-Weight C Graphics Library

    Hi. I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Extremely Light-Weight C Graphics Library

    Thank you good sir! This is exactly what I've been after. My ideal solution was OpenGL without the useless Win32 baggage that usually comes with it. GLFW appears to do …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Extremely Light-Weight C Graphics Library

    Hi. I am familiar with the following C graphics libraries: Cairo, SDL, SDL2, and OpenGL. The problem I have found with these is that they either require shared libraries (Cairo/SDL/SDL2) …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in C++. No specific error given

    `cin >> t1 >> t2 >> t3` I know that it seems like an unintuitive way to get 3 values from input, but it makes sense once you learn about …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Extract more value from one variable

    First of all the code `for (a=4; a<5; a=a++)` is undefined behaviour, you probably meant `for (a=4; a<5; a++)` which 'loops' a from 4 to 5 (essentially just running the …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in A historical question about compilers

    By hand. What they did was they wrote out the code of the compiler in some slightly-higher language. Then they manually went through the code and compiled it themselves. Once …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Get input from another class

    Judging by your code it looks like you are doing Android development and trying to pass data from one activity to another. Due to the nature of Android activities (multithreaded, …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in problem to convert program using c functions

    Functions are used to pack repeated code together. The general form of a function is this: <return-type> <identifier>(<arguments>) { <body> } This means for example that these two programs are …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in product between two arrays of 2 dimension

    In your current code you populate the array with `sc.nextInt()`, now you want to populate them with random numbers. There is a method called `Math.Random()` which gives you a random …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in help in string combinations

    First of all that is C++, not C. Second your problem description is poor, however I think I understand what you are after. Of interest is this code snippet: //This …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Tricky Program in C language

    I don't normally resurrect dead threads, but I will make an exception. These types of esoteric programming problems are often frowned upon for teaching bad programming practices. This is not …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Resolution of "stray \### in program" errors

    Hello, I posted on this forum two times before about a particular pair of non-printing characters being inserted into my code. You can find the threads [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https://www.daniweb.com/software-development/cpp/threads/450296/arbitrarily-appearing-non-printing-character). Two …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Resolution of "stray \### in program" errors

    Hello, I posted on this forum two times before about a particular pair of non-printing characters being inserted into my code. You can find the threads [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https://www.daniweb.com/software-development/cpp/threads/450296/arbitrarily-appearing-non-printing-character). Two …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Occuring symbol per line

    Your problem is that you are printing the number of semicolons (which is the correct name for 'dotcoma', its like a colon (':') but only half ';') The line in …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Custom highlighting in vim

    The issue with sublime, as with notepad++ etc, is that they only do existing languages, not languages that my prof's invent to help us learn specific algorithms and techniques. On …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Custom highlighting in vim

    Hello, I used to use Code::blocks and eclipse for code editing, but started to find them slow. I started searching for lightweight IDE's and found that the prevailing opinion is …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Plain TeX drawings in PDF mode

    Hello, I have an issue with a plain TeX document I am writing. I need to compile drawings as well as images into pdfs. I know how to get images …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Adding execute bit to USB

    Hello, I have a USB key on which I do all of my programming. It is formatted as an NTFS drive with 32 gigabytes of space. On this drive I …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Offsetting Bytes

    In java, `x<<y` shifts x y bits to the left. `x>>y` [arithmetically](http://en.wikipedia.org/wiki/Arithmetic_shift) shifts x y bits to the right. `x>>>y` [logically](http://en.wikipedia.org/wiki/Logical_shift) shifts x y bits to the right. These operations …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Binary File Input Bug

    Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Binary File Input Bug

    You are right, but the shift is necessary to get the bytes in place (unless I use a union). I figured out the problem. When I encounter a negative number, …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Binary File Input Bug

    > So, all you have to do is to read 4 bytes then reverse them. Which is exactly what I was doing with my char shifts, and it works about …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Binary File Input Bug

    The file is written by another program of mine (its assembled machine language, this program is an emulator of a CPU). I know for a fact that I want Byte1, …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Binary File Input Bug

    The reason I used character shifting is because that is the only way for me to ensure correct endian-ness. When I do it your way I get everything inverted, which …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Binary File Input Bug

    Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Generic Stack Management

    Hello, I have learnt a few assembly languages (MIPS/x86/ARM/MIX) and I have a question about the call stack. Each of those languages uses a different method for subroutine linkage, and …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Using a parsing algorithm to generate a list of tokens?

    Hello, I recently took a course on assembler/compiler construction. In it we covered parsing algorithms such as LL(n), LR(n), LALR(n), and SLR(n). I understand how these parsing algorithms can be …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Using a parsing algorithm to generate a list of tokens?

    I knew I was forgetting a step. I do recall lexers and lexemes. Once I have the tokens, each one acts as a terminal in the context free grammar. Then …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Using a parsing algorithm to generate a list of tokens?

    Hello, I recently took a course on assembler/compiler construction. In it we covered parsing algorithms such as LL(n), LR(n), LALR(n), and SLR(n). I understand how these parsing algorithms can be …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Convert from localtime to localtime_s

    Let me take a look at the exact code that you used (just from creation of the time_t to the call of localtime_s) I'll see if I can figure out …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Convert from localtime to localtime_s

    The issue is that `localtime` and `localtime_s` are slightly different. The _s stands for safe, it is a memory safe version of `localtime`. As such it does not create it's …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in [Error] name lookup of 'n' changed for ISO 'for' scoping [-fpermissive]

    This is one of those sneaky bugs. Basically it is telling you that if you declare a variable in the for loop, it only lasts as long as the for …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in HELP WITH SHOOTER GAME

    What have you got so far? What libraries are you using for I/O (Win32API/SDL/SFML/etc)? Typically you will use your I/O library to poll for events, then detect the arrow key …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in code blocks class

    You need to ensure that all 3 files will be included in your project. You have to set it up so that first samclass.cpp is compiled, creating samclass.o. Then main …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Memory leak issue

    It worked with my compiler and it worked on ideone (http://ideone.com/Gnxc32), but I expect it probably is undefined. From what I understand of the situation you cannot create a const …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Help with some functions C++

    I only took a quick glance at your code. However I did notice one likely bug in your program, particularly in the CCalcCorr class. The issue is that everything in …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Memory leak issue

    Hello, I was recently looking through some of my code and found what I believe to be a memory leak. It is in a function that appends two strings and …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Memory leak issue

    It turns out that a deeper look at strcat reveals me to be an idiot. It works by absorbing a buffer and using that, so that the user can be …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Memory leak issue

    The issue is that the project that this is in was created before the C++11 standard, and thus some of the variable names have been claimed as keywords. I temporarily …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in C++ Question

    There are quite a few issues with your code... I will go through them one by one. 1) Invalid entry point void main { Is not the correct way to …
  • Member Avatar for Labdabeta
    Labdabeta

    Created Memory leak issue

    Hello, I was recently looking through some of my code and found what I believe to be a memory leak. It is in a function that appends two strings and …
  • Member Avatar for Labdabeta
    Labdabeta

    Marked Solved Status for Inexplicable error

    Hello, I feel like this is probably something silly, but for some reason if I declare a variable at a certain point in my code, then never use it... it …
  • Member Avatar for Labdabeta
    Labdabeta

    Replied To a Post in Inexplicable error

    Ah, thank you both. Memory corruption was indeed the error (although isBuf==4 is the correct check condition because it is preceded by isBuf++ each time). However my ASCIITOLABASM macro caused …
  • Member Avatar for Labdabeta
    Labdabeta

    Edited Inexplicable error

    Hello, I feel like this is probably something silly, but for some reason if I declare a variable at a certain point in my code, then never use it... it …

The End.