General C++ Programming - June 2020 (Page 3)

compiling rocksdb from sources on windows 10 (vstudio 2015)
 
hi All, Its been ages since I programmed in C++. Forgot more than I remember. More as an exercise, I downloaded rocksdb sources and all the sources for ...
[10 replies] Last: Just the old ones. Thanks for the tip, I'll get everything new and tr... (by mikepukmel)
by GonlyG
Calculating Y = Kx + B getting wrong answers
 
I'm given years x and y and each year's "X" and "Y" data. I have to calculate K and B and output them, but my program's always slightly wrong. I can't figure ou...
[5 replies] Last: also, the first loop is to input data, the second loop is for actual c... (by GonlyG)
Problem with my jumping simulation
 
Hey guys, So I think I am finally getting the idea of vectors, a vector can represent a point in space but it can also represent a force or a movement of an ...
[6 replies] Last: that makes sense :), so basically if there is a plethora of events in ... (by adam2016)
Bitonic Sort C++ whit MPI
 
Hi, everybody, I'm searching for a C++ file where it is wrote the BitonicSort parallelized whit mpi... I Found something but I didn't understand... Can you h...
[1 reply] : Which bit don't you understand - the bitonic sort or the MPI paralleli... (by lastchance)
How to dynamically allocate and free memory for the below structure
 
How do i properly allocate and free memory for structure test in c++ struct test1 { int a; long b; ..... } struct test { test1 testHdr; char t...
[4 replies] Last: You can give the class it's own overloaded new / delete. https://www.g... (by salem c)
by ytba
Convert into C++
 
Help me convert this into c++ Length ← length (List); Max, Location, Value, Stack1, Stack2; For i ← Length -1 to 1 do Max ← i; For j ← i - 1 to 0 ...
[4 replies] Last: Well pretty much every if / for / End if / End for in your pseudo cod... (by salem c)
by ytba
Coverting to C++
 
Hey i need a help to convert a line into C++ format. For n ← Location - 1 to 0 && i - 1 Thanks
[1 reply] : A c++ for loop looks like this: for (initial, condition, action) ini... (by jonnin)
by frek
C++ strong types
 
Hi all, I encountered such a term "C++ strong type" and have no clue what it is. I also surfed the Web but the resources explaining it are either too advance...
[2 replies] Last: There's two dimensions when it comes to typing in a language. - First... (by Ganado)
by GonlyG
Tic Tac Toe algorithm timing out on long cases
 
I've encountered a programming problem where there are multiple games of tic tac toe being played and you have to deduce, when making a specific move, who will ...
[14 replies] Last: TTT is sometimes used to explain a concept of 'transposition tables' w... (by jonnin)
Pass enum in a scope to another as function argument
 
How pass enum in a scope to another as function argument ? Why is it fail ? enum class L; struct TestClass { void foo(L n) { int v=static_cast<int>(n); i...
[6 replies] Last: it works fine for me if you just replace the forward decl of L with th... (by jonnin)
by zapshe
CPP Project and Review
 
Make a program that'll cook dinner and give me pick up lines when I need it. Codingame.com has some good puzzles to solve.
[2 replies] Last: Years ago I wrote a sudoku solver program in C++ and found that it con... (by dhayden)
CppCast: Web Assembly
 
Rob and Jason are joined by Ben Smith from Google, chair of the Web Assembly working group. They first discuss a blog post on how to ask for C++ coding help, co...
[no replies]
by frek
Code review and Lambdas
 
Hi all, First, how do you find the code below, I mean if you review it, please? #include "std_lib_facilities.h" #include <numeric> using namespace std; tem...
[14 replies] Last: lambdas have types Some strictness is required when using terminology... (by Ganado)
hospital management system
 
Hi so basically i have a project where i have to create a management system of a hospital. it is not complete and i am still working on . so basically in the sw...
[1 reply] : How many threads there will be on the same "hospital"? (Double-posting... (by keskiverto)
Binary Search where the data is ordered in descending order.
 
I got an assignment for my class to modify the Binary Search where the data is ordered in descending order. But I can't figure out how I'm supposed to modify i...
[2 replies] Last: (After changing your sample data to be ordered descending) there is on... (by lastchance)
by Odglog
How to design custom characters for the console?
 
Hello! Just wondering, I want to make a text-based game in the console and I want my characters to be interesting, I know about Unicode, but it doesn't have ...
[4 replies] Last: I'm really sorry about the delay, I was really busy, thanks for the re... (by Odglog)
C++ Starter template repo for Bazel and Visual Studio Code with GTest, Glog, and Abseil libraries
 
I put together a C++ starter template repo for Bazel and Visual Studio Code with GTest for unit testing, Glog, and Abseil libraries. Please check it out here: ...
[no replies]
C++ getting the average from just one line
 
Hey I was playing around with 2d arrays and i im trying to find out how to get the average from just one row. im not sure how to do this. here is a 2d array bel...
[7 replies] Last: jonnin. thank you that makes sense. i will mark this as solved. (by somedude)
Collision problem SDL
 
Hey guys, so the problem... well watching the 1 minute short video I uploaded to explain the problem may give you a better understanding of what is wrong - ht...
[12 replies] Last: I'm kind of not sure about point one You're doing it already. :) Yo... (by dhayden)
Can anyone explain me Read/Write structure objects to file
 
I am BSSE student of First semestor my teacher write like that code but it does not make any sense to me, means i didnt understand this! void writeData() { w...
[3 replies] Last: okay, thanks to all. (by lablnet)
June 2020 Pages: 123456
  Archived months: [may2020] [jul2020]

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