-
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 … -
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 … -
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 … -
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 … -
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) … -
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) … -
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) … -
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 … -
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) … -
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 … -
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 … -
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 … -
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, … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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, … -
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 … -
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, … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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 … -
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.