General C++ Programming - September 2018 (Page 8)

function
 
im new to c++ and im trying to learn the function together with passing the parameter. ive tried doing a question on coding a simple currency converter using fu...
[3 replies] Last: wow thanks guys. my program is running now. thanks again for the tips ... (by rarian10)
Deleting some elements of a (forward) list while iterating
 
I have a list of objects, each of them has a different steps lifespan. A cycle decreases the lifespan of each by 1, and when something reaches 0 i have to rem...
[2 replies] Last: // a cycle makes one pass through the forward list, decreasing the li... (by JLBorges)
Shoretst Sequence of Operations
 
Hey everyone. Just for fun I am doing this problem: Consider this puzzle: by starting from the number 1 and repeatedly either adding 5 or multiplying by 3, a...
[5 replies] Last: Except, it doesn't satisfy the specification w.r.t. the output. Doing ... (by toad)
Using Splashkit create a conversion equation code
 
Hey, I'm new too C++ so I have a pretty simple question I guess. How do you make the program that converts litres to gallons and gallons to liters on the vis...
[2 replies] Last: I would just make conversion factor constants, and go from there... r... (by jonnin)
by stav
Questions about c++, syscalls, and compilers
 
Hi, how exactly does libc (and windows version of the runtime library) implement syscalls? Because in c++ (AFAIK) you cant directly modify registers, but don't...
[9 replies] Last: helios, this is where I get into trouble.... the visual studio compil... (by jonnin)
Time Counter Problem
 
Hi, I have a program to count second 6 times faster than in the real life but something goes wrong: time_t start; double second; double minute; double hour; ...
[2 replies] Last: I think there are many problems with your code memeguy. Do you realiz... (by poteto)
Where do you learn basic c++ information? Like representing function pointers
 
The title is not very specific but what I am referring to is stuff like having a function accept a pointer to another function. See below for what I am referrin...
[7 replies] Last: Fair enough. But the result of the unseen conversion (for function*) ... (by jonnin)
Error in checking for win conditions in a function using arrays.
 
I am trying to write a program for the game sudoku. I have the following function to check each row, column must contain each value in {1..9} exactly once. But ...
[5 replies] Last: #include <algorithm> // return true if array row (length at least 9... (by JLBorges)
Copying strings and integers to arrays from an external file
 
Hello. I am trying to figure out how to copy information into 4 different parallel arrays from a text file. This is an example chunk of the text file: Zip...
[1 reply] : Seeing your code would help... (by SamuelAdams)
Fix Code
 
// TODO: The score is not showing... // TODO: Ensure the score increases when the user splats a fruit. #include "splashkit.h" using namespace std; #de...
[2 replies] Last: there are tons of perfectly good code formatters. Most work well enou... (by jonnin)
How to generate random numbers within an array
 
I am trying to do following game. Read in the first user input die letter, which should be an upper-case R, G, or B, and use that letter to determine which die...
[3 replies] Last: #include <iostream> #include <ctime> #include <cstdlib> #include <cct... (by JLBorges)
Declaring functions
 
How can we declare name and age using this two terms? void name();//declaring name function for testing void age();//declaring age function for testing
[1 reply] : http://www.cplusplus.com/doc/tutorial/functions/ has section about dec... (by keskiverto)
Stable Low Latency with sockets/winsock
 
Hello, I got a question thats more general. i hope this might still be the right place to ask... i did a server/client test application in C++ with sockets/wi...
[4 replies] Last: On the Internet, data consistency is positively correlated with latenc... (by helios)
Reading From Data Files using structures and functions
 
My main question is how to solve where I am going wrong with my code, I am a moderately skilled programmer and I was assigned this code for one of my projects. ...
[1 reply] : This is what you do: int age[ 5 ]; age[ 5 ] = 42; What is wrong in t... (by keskiverto)
by pon r
mingw portable binary
 
Hello Today I found cevelop (it is eclipse cdt will bells and whistles). But it needs mingw to be installed and on you path. I am looking for: A. A portable...
[3 replies] Last: That's what it says in the blog. Just point to mingw. You can put bin ... (by poteto)
by volang
C++ or the computer more in depth
 
How did we do things and solved problems more manually before all these libraries? I mean. For example, how could you loop through a whole folder(c:\mymapp...
[8 replies] Last: If you want to write a simple OS, take a look at wiki.osdev.org (by uplime)
by doug4
Problem Moving a Thread
 
I am finally getting a chance to play with std::threads. I want to be able to create a class that 1. Encapsulates the thread's functionality 2. Does not...
[3 replies] Last: I guess it's just trying to be clever and do the right thing. It works... (by Peter87)
by volang
undefined reference to imp PathIsDirectory
 
I have included <shlwapi.h>, and in building options -> linker settings, I have added "libshlwapi.a". This does not work for "PathIsDirectory". I get undefined...
[9 replies] Last: Trust me, laptops count as desktop apps, since they are fundamentally ... (by poteto)
by volang
Information about content in folders. (Windows)
 
For example, when hovering over a file in c:\, a file description will quickly display that includes the file type, size, and date. Now I wonder if there is a f...
[6 replies] Last: My eyes shined when I heard you say that, and I immediately I tried th... (by poteto)
by volang
System calls, anti-virus
 
I'm not so familiar with how anti-virus software works. My guess is that they do not like system calls? For example, if my program makes a system ("dir"), ...
[2 replies] Last: it should not complain. AV software works in many ways, its not a s... (by jonnin)
September 2018 Pages: 1... 6789
  Archived months: [aug2018] [oct2018]

This is an archived page. To post a new message, go to the current page.