General C++ Programming (Page 2)

Constructors help
 
Hello, I'm learning on how to use Constructors and I can't figure out what's the problem in the co...
[3 replies] Last: 1.You forget to include the head file---<string>, include it. 2.You fo... (by ningfan666)
by jonnin
Trying to add lazy constraints to traveling salesman problem
 
if (ui - uj + lokasyon * xij <= lokasyon - 1) { any chance this logic came from a system that uses ...
[2 replies] Last: Hmmmm, someone got booted, here's what was "said": [quote=oxanaxu]for... (by George P)
cplex fails to solve when lazycuts are added
 
i am trying to add the subtour elimination constraints as lazy cuts Huh, what? For starters: P...
[1 reply] : Duplicate: http://www.cplusplus.com/forum/general/283651/ (by George P)
Locale Specific Code
 
I have some code that is supposed to manually separate the numerical groupings for arithmetic types ...
[3 replies] Last: BTW, India is the only outlier in digit groupings that exists in the r... (by Duthomhas)
Passing in an array of structs to a function
 
Hi, I'm looking to pass an array of structs to a function and wanted to check that the way I'm doi...
[8 replies] Last: > If, however, in the OP param comes from passing a pointer from say ... (by JLBorges)
Using TinyMAT library in c++
 
Hello everyone. I am programming in c++ and I am using the TinyMAT library to export what I have w...
[1 reply] : https://github.com/jkriege2/TinyMAT -> Does the example shown on their... (by newbieg)
Input a name and convert it to an encrypted name
 
using string as a data type, how to make a program where you input a name and then coverts the lette...
[8 replies] Last: #include <string> #include <iostream> #include <cstring> std::strin... (by seeplus)
Can you create an instance of a class using a variable?
 
I am trying to make a class that is created based on user input. I was wondering if it is possible, ...
[4 replies] Last: https://stackoverflow.com/questions/72245348/using-user-set-variables-... (by lastchance)
by Cplusc
CUDA
 
I am working with VS 2022 and CUDA 11.7. I am trying to run the following example named VectorAdd.cu...
[2 replies] Last: Thanks. (by Cplusc)
by lcs123
Problem in calling a .hh file.
 
For this question, i have basically 4 main files, let's call it: Constant.hh Cons...
[4 replies] Last: I have not worked with Cmake, specifically. But I do have some experi... (by doug4)
is it possible insert a string to the beginning of a stringstream?
 
has the title states, i am wondering if it is possible to insert a string at the front of a stringst...
[4 replies] Last: > insert a string at the front of a stringstream buffer? We can use t... (by JLBorges)
by Pen72
BFS maze
 
Hello, I've been trapped by this problem for days. Now passed three cases, but still got three termi...
[3 replies] Last: @zapshe - that's the problem and why I haven't tried. The actual input... (by seeplus)
Outputting the number of values in a txt file?
 
Hello, For my project I am meant to put out a small table regarding wind speeds, categories, etc,...
[2 replies] Last: As a first refactor, possibly something like (output needs formatting!... (by seeplus)
Thread much slower than the function itself?
 
Hi everyone! I've made a function that runs fast but when i use a single "thread" to perform it the ...
[13 replies] Last: As already mentioned creating threads should be done only once at the ... (by coder777)
by SSDEEZ
function to update height of a node
 
I'm trying to create a function that can return a node at a given key after inserting into a binary ...
[5 replies] Last: this all seems to be working with simple testing... could use cleanup.... (by markyrocks)
by Cplusc
shared memory
 
I have been working with MPI for a while and I've got some questions regarding what is really happen...
[11 replies] Last: @keskiverto In case of GPGPU, The device's memory of different machine... (by Cplusc)
Period of the reciprocals of prime numbers
 
The period of the reciprocal of a prime number is the number of decimal places in 1/p until it begin...
[10 replies] Last: 1,666,665 repeating digits in .02 seconds is no mean feat. (by againtry)
Multi-threaded event queues?
 
Context: In some games I'd imagine commands can be entered faster than they complete. For instance, ...
[5 replies] Last: If'n you plan on using nothing not available in the C++ standard libra... (by George P)
Multidimensional array data storage
 
I want to store an 80x80 array where each array will have 3 integer values. Nay Idea on how to get t...
[3 replies] Last: Another potential solution may be to use an STL vector coupled with a ... (by ziad ismaili)
win counter and list every winner in each game
 
I'm creating a program that has four games. Each game will have two team. In each game, there would ...
[9 replies] Last: As a first refactor, consider something like this which has extra roun... (by seeplus)
Pages: 1234... 7
  Archived months: [mar2022]

Cannot post in this page. To post a new message, go to the first page.