General C++ Programming - November 2019 (Page 4)

having from std string type object, a pointer to non-constant char
 
How to convert/have from std string type, a pointer to non-constant char How is this to work #using namespace std; int main(){ string str="foo"; //... // t...
[2 replies] Last: string str; char tmp ; if (fgets(tmp, 19, stdin)) //inject standard C... (by jonnin)
Help With this Sales Project
 
Hi Everyone, I am super new to C++ and we are getting into arrays in class and it is really stressing me out... I need to fill in the blanks in this program and...
[9 replies] Last: ... now that I am 99 percent done ... I admire your optimism. As y... (by doug4)
Icinga2 API - delete bug
 
Hello, I'm working with Icinga at the moment, but there is a bug, that i dont know how to fix and thats why im asking for your help: https://github.com/Icinga/...
[3 replies] Last: I've no idea. I just commented on a couple of observations that would ... (by salem c)
The char str[700] in C++ string syntax
 
How do we convert char str initializing into C++ string syntax? int main(){ //... char str ; // string eqivalent... string str; //...? } Thanks...
[1 reply] : Something roughly equivalent would be std::string str(700, 0); How... (by helios)
Word concordance using BST as a data structure
 
I'm trying to write a program for word concordance. The user has to search distinct words and display the words in a concordance. When they are done, it will di...
[no replies]
reset/purged static variables in the C/C++ function
 
How can we reset/purged static variables in the C/C++ function on certain condition met?
[4 replies] Last: @dhayden, thanks for pointing out. this is something I never learned m... (by malibor)
for loop to sum all even ints
 
I was assigned to write a program that could sum all even numbers between two numbers that a user inputted (assuming the first number was less than the second n...
[5 replies] Last: #include <iostream> using namespace std; int main() { int x, y,... (by eyssant)
by jebek9
remove duplicates strings
 
#include <iostream> using namespace std; void add_ch(char *str, char c) { while(*str) str++; *str = c; *(str + 1) = '\0'; } void del_first_ch(ch...
[15 replies] Last: or, signal end-of-file on your terminal. On Linux, press Ctrl-D. On W... (by mbozzi)
How to get out * on the display - C++ 11
 
Hello everyone, I have been programming for a short time in C ++ and I'm looking for a way to create a program (very simple) that when I input something on the ...
[1 reply] : http://www.cplusplus.com/articles/E6vU7k9E/ (by Repeater)
by bean
Progress bar in Winsock transfer file
 
Hi, i have a server-client program wich sends a file, and i'd like to add a progress bar to it and i don't know how to do it. Here's the file receive function ...
[7 replies] Last: Well recv() makes no guarantees about filling your buffer. You can ma... (by salem c)
Definitive way converting C source codes into C++
 
How do we, in the definitive way, convert C source codes into C++ having stdint.h, stdlib.h, string.h, stdio.h, inttypes.h, pthread.h, done mostly by regex find...
[4 replies] Last: If the C code compiles and works as wanted why change it? As a learni... (by George P)
Radix sort negative integers problem
 
with positive integers it works just fine, but with negative it doesn't. Does anyone know why is that so and what i need to fix to get it working with negative ...
[3 replies] Last: if you never need it, negative addressing IS legal, but you need to en... (by jonnin)
C strtok_r() for C++
 
What/how is C strtok_r() function equivalent in C++?
[2 replies] Last: Or better yet use C++ string and some of the standard C++ string funct... (by jlb)
Accessing Child Members From Array of Parent
 
I am currently in development of a little game project but I've run into a pretty significant issue. I have an array of class 'Entity' which is supposed to repr...
[4 replies] Last: > why did you choose to use structs? If that makes a big difference t... (by JLBorges)
Help with Number Analysis Program
 
Hi, I have this code written to analyze a list of 12 numbers. The numbers are stored in a file called numbersfinished.txt and the program is asking the user to ...
[12 replies] Last: Hi guys update: I finally got my code to work! Not 100% sure what I di... (by Orlando1130)
C's strdup() equivalent in C++
 
What is strdup() equivalent in C++?
[1 reply] : Assignment. You just do s2 = s1 and voila, instant copy of a string. (by salem c)
mensaje
 
lol, google offered me to translate this page :D
[1 reply] : I don't see a question in that wall of text, yet the OP marked this to... (by George P)
Personal fields or members that give function/method properties?
 
I'm looking for a set of personal-to-[methods/functions] data fields. A library or something that I can include and activate to give these fields would be nice.
[7 replies] Last: [quote=malibor]I believe the OP is refering to either std::variant ..... (by George P)
by raneie
Working with arrays
 
How would I make my array display the item, quantity, and price? Here's what I have: Main #include <iostream> #include <string> #include <iomanip> using na...
[no replies]
by LHHH25
Functions Calculator
 
HI, so I'm making a calculator using functions, but its not working properly. So im asking if anyone can look and show me the right direction ? and if you want,...
[1 reply] : Use Code Tags: //Your Code Here You don't have any function... (by zapshe)
November 2019 Pages: 123456... 8
  Archived months: [oct2019] [dec2019]

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