General C++ Programming - December 2019 (Page 8)

C puts(char * ..) in c++ of string type arg
 
How do we convert C puts(char *...) into C++ function of string type arg?
[1 reply] : cout << the_string; (by Repeater)
What is the best time of sorting algorithms?
 
What kind of time, meaning, which time should I prefer to keep track of time for each algorithm? (Like seconds, milliseconds, nanoseconds, or something that I c...
[3 replies] Last: Ok, thanks for that. So you mean, any units of time that would be more... (by jonnin)
by volang
Socket receive buffer
 
The clients my server serve always sends a initial request with ONLY the headers/info before the real content. Can this initial request come in "chunks" ev...
[1 reply] : What do you mean by "headers/info"? (by kbw)
by volang
Store pointer in a string
 
Hello. I need to store a "char *" in a string, and then use that string to access the same pointer. How can this be done?
[9 replies] Last: string v = to_string((int) &b ); int z = stoi(v); char * x = (char*) ... (by jonnin)
Cant figure out a recursive function.
 
Recently took intro c++ class and learning recursion but im not sure how to approach this question. Any help would be appreciated. Question: Implement a re...
[5 replies] Last: I think i got it. Thank you so much. int firstTwo(int n){ if(n < 10... (by duhfiant)
Implementing modular Runge-kutta 4th order method for a n-dimension system
 
Hello, i'm trying to make my runge-kutta 4th order code modular. I don't want to have to write and declare the code everytime I use it, but declare it in a .hp...
[1 reply] : Wrap things up in a class. #include <iostream> #include <cmath> usin... (by salem c)
I tried to make a linked list, but it doesn't work. Help me plz!
 
I want to declare string as protected in the header file, but I keep getting an error. I want to declare a virtual function, but I get an error. How can I...
[2 replies] Last: Thanks nuderobmonkey! Thanks to that, I realized that using namespace ... (by somang317)
How to call function in the way require it as inline
 
How to call function in the way require it as inline function only on this particular call, and the function may not have inline identifier in declaration
[2 replies] Last: write the function body (no header) in its own cpp file. the variable... (by jonnin)
Is there an easy way to draw a triangular grid in C++?
 
I want to draw a grid of equilateral triangle using C++. Output suppose to be consist of multiple triangles. Not like this type: 1 1 2 1 2 3 How do I p...
[3 replies] Last: @againtry, Yes it'll be lined. (by iamjaved)
by volang
Functions when multithreading
 
I have a function and inside this function, I store some variables. Let's say the first thread runs the function, some values get stored in to "the function ...
[2 replies] Last: Hey man. Thanks for your reply. Simple and clear. (by volang)
by volang
When you subtract pointers to get the index...
 
Address(ptr) - Address(ptr) returns the index/pos of a value in a array. Now I wonder, does the system already now in advance what two positions/numbers to use ...
[15 replies] Last: https://www.techiedelight.com/find-index-element-array-cpp/ (by againtry)
Populating structure variable with multiple values from file
 
For this program I'm trying to get the variables of the structure to include specific lines read from a file. I need "name" to include the move names listed in ...
[2 replies] Last: There is also operator overloading : // expected format: name on fir... (by keskiverto)
C++ VS Visual Basic?
 
I have heard pretty much everyone who knows about programming say that c++ is better than VB, from what i can see, vb does the same stuff C++ does, but with mor...
[3 replies] Last: I agree, the fact that VB scripts work right out of the box is a plus.... (by Ganado)
Run batch file from C++ code
 
Hi All, I want to run a batch file from specific environment in my sample C++ code. Bellow are the steps: 1. open a environment specific command prompt ...
[7 replies] Last: Yeah, I usually use ConEmu, but I also use the plain Windows Console a... (by Duthomhas)
URGENT please help this code is not running properly i need to submit tommorow
 
Hi so i need to submit this code tomorrow as my school project but its not running properly this is a quiz maker with built in calculator code which can make 2...
[2 replies] Last: void quiz_read() {cout<<endl<<"Hey There how are you today:"; gets(doi... (by kinganonymous)
Belfast Trip Report
 
Rob and Jason are joined by Timur Doumler. They discuss some of the news that occurred at the C++ ISO meeting in Belfast where the committee responded to some o...
[no replies]
To get all file names in directory
 
Hi All, Requirement is: Need to get all file names in given directory. I found some ways using third party lib - boost but I am don't want to use it. I wa...
[5 replies] Last: I want the solution within standard C++... I am using Visual Studio 2... (by Repeater)
by m00se
Octree and Node constructor for Triangle& pointer to reference error
 
Introduction Hello i am a first time poster long time lurker of c++. I recently started again on my gfx programming training and decided i would challenge my...
[3 replies] Last: ya i didnt notice it at first changed them to vector<Triangle> and vec... (by m00se)
sum of vector elements
 
Hi, i m reading 2 measurements from oscilloscope for eash diver setting( 15) i am geeting the desired out put 2 measurements for each setting, now i want to ...
[5 replies] Last: First of all, please use code tags when posting code. See http://www.c... (by keskiverto)
by cjoce
Class Member's Pass
 
Hello! I found this example online and am trying to play around with it. I know it is possible to get the sum of the array in the PutData() member function, b...
[1 reply] : First, your program has syntax errors: In member function 'void Empl... (by keskiverto)
December 2019 Pages: 1... 678910
  Archived months: [nov2019] [jan2020]

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