General C++ Programming (Page 3)

Can an object pass itself to a function (not part of a class i.e. global scope), which modifies that object.
I'm confused as to how to achieve that, most of the examples i have seen have methods present in an...
[3 replies] Last: I have figured it out, for anyone else the final code would be // f... (by ImC0nfused)
by axl
Bowling Frame Program
Hello, I'm stuck with this program I'm trying to make. This is what I'm supposed to do: create a ...
[1 reply] : Hello axl, So what did you not understand from post http://www.cplusp... (by Handy Andy)
need help with pollymorphism
below is the data that i have to read from a txt file using the fstream lib and store them in some d...
[4 replies] Last: For istream >> overload, don't use const for the target - otherwise th... (by seeplus)
Hello everyone. So my task is to write a program that will find its way into a numerical maze. Nu...
[10 replies] Last: @jonnin, That is kind of what I figured. But OP starts by talking ab... (by Handy Andy)
seperating decleration and definitions of classes
i created a game in sdl library, the game is working just fine but for the game i created few classe...
[2 replies] Last: Possibly a little late for the suggestion, but it's always best to des... (by seeplus)
Argument Type is incompatible with parameter of same Type
Trying to write a C++ OO code for magic the gathering. And I'm getting an error that I probably am m...
[13 replies] Last: It may help if you posted the definition of Cards , Creature , Sorc... (by kbw)
by volang
How to convert data in char array to hex? (1,2)
I have a null terminated char array (recvbuf) which contains 517 characters (charLength). I need thi...
[27 replies] Last: Now you confused me. The hex representation of the binary stored in ... (by jonnin)
2d matrix of pixels to screen
I have a program (slime mold simulation) that generates a big 2d array of values. I want to draw thi...
[9 replies] Last: The values are stored in a dynamic array of integers so I can easily p... (by Zarro110)
Error: Openmp c++: error: collapsed loops not perfectly nested
I have the following serial code that I would like to make parallel. I understand when using the col...
[3 replies] Last: Using a shallower loop is easier for the branch predictor. Actually th... (by helios)
Merge part of mergesort
Hello guys. I have the following code for mergesort: void merge(T a , int l, int m, int r) { int ...
[5 replies] Last: It's best to allocate the extra space dynamically (perhaps as a vector... (by dutch)
by axl
Bowling Program
Hello, I'm stuck with this program I'm trying to make. This is what I'm supposed to do: create a pr...
[1 reply] : Hello axi, PLEASE ALWAYS USE CODE TAGS (the <> formatting button), ... (by Handy Andy)
Please help
below is my simple cpp program. it does not print the value of k as float. it's printing the integer...
[4 replies] Last: #include<iostream> using namespace std; int main() { int N; co... (by lastchance)
How to store cell values of date and numbers in local variables using xlnt library for C++
I am trying to read different cell values from a excel worksheet using the xlnt library for C++ prov...
[1 reply] : does this work? int x = stoi(cell.to_str()); or double d = stod(cell... (by jonnin)
OpenMp: Parallel code takes longer to run than serial code?
I have a serial code with simple forward FFT function and other functions, in the main code a basic ...
[8 replies] Last: nah that 1 thread run isnt random. its likely it cached something afte... (by jonnin)
sdl program not restarting
i have literally spent all night trying to ask the user to if he wants to play again pres enter, and...
[1 reply] : debug it, step through what all your variables are in the second run. ... (by jonnin)
Is there a means of redefining free functions?
I'm writing some unit tests for some extension methods, and some of the other extension methods call...
[1 reply] : yes, you seek preprocessor, look up an example of #ifdef -- it forms a... (by jonnin)
Failure of boost::geometry::within for polygons
Dear experts As this title, I failed boost::geometry::within, some are succeeded but the others a...
[2 replies] Last: @Mitsuru, when you say "failed", what do you mean? Can you give examp... (by lastchance)
Dynamic programming. Recursion. Loops.
Hello! Please tell me how to implement an algorithm with recursion using loops. "main.cpp" #in...
[13 replies] Last: Oh, thanks a lot!) (by hentaimean)
by dkaip
Remove duplicates of vector problem
Hello. I have the classic remove duplicates of vector. At line remove_duplicates(channels); compiler...
[4 replies] Last: Thank you. Finally code. std::vector<channel> channels; te... (by dkaip)
by Laiter
Connectionless p2p library
I'm looking for a simple library that allows me to send packets between pc's using their IP and with...
[2 replies] Last: In that same vein try "socket programming C++" searches if you haven't... (by againtry)
Pages: 12345... 7
  Archived months: [apr2021]

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