Beginners - January 2022 (Page 3)

Problem with stod function in C++
 
Hello, I'd like to convert the string to double. after convert, s is not the same of d. Could you ...
[2 replies] Last: after convert, s is not the same of d True. As expected. Round-trip... (by seeplus)
Operator overloading error for complex data
 
I wrote this code vector<complex<double>> y1,y2; //some stuff vector<complex<double>> W_N; ...
[15 replies] Last: @lastchance, could be. I'll try that later. Thank you everyone for yo... (by Rakib771)
Is there any way to add functions to std?
 
I have just been very curious as to how header files add functions or anything at all to std because...
[2 replies] Last: The standard library implementation does this: namespace std { void t... (by mbozzi)
file search
 
I need to take leftmost variable from last line of file. getIncrement.seekg( sizeof( ClientData )) ...
[3 replies] Last: I would be tempted to say to read one letter at a time backwards into ... (by jonnin)
Error with multiple template in operator overloading
 
Simply, I tried overloading '+' operator for vector container. When I do this, <template<class T>...
[5 replies] Last: We can use an expression template to hold the result of the + expressi... (by JLBorges)
how would i match get a word only if it is between 2 numbers using regex
 
how would I match get a word only if it is between 2 numbers using regex eg the input is: 5testword5...
[2 replies] Last: @dizzyDon only works for the first word, inputs such as 123hello123he... (by codinglexernewbie)
Simple login program will read from file but won't write to it.
 
I'm writing a simple login program that reads and writes info from a text file. The program will rea...
[2 replies] Last: This will work better, thank you for the correction. (by pizzafreak1991)
Class Will Not Run
 
For an assignment, I'm supposed to create a class called piano and then use the methods: 1-) LoadNo...
[14 replies] Last: ... furthermore, that code does not "test" class Piano. It is closer t... (by keskiverto)
system with variable
 
Hello! Need to take variable char or string data and make system call (Linux CLI) as per above. P...
[13 replies] Last: > I don't know how to convert linux commands to C++ functions. https:/... (by salem c)
Breaking down this class
 
It's been quite some time since I've lasted tackled a programming assignment, so forgive me for what...
[13 replies] Last: Actually there are several problems: /** * Returns the element of the... (by coder777)
What is the problem with 2d array in C++ code?
 
Hello, I wrote the below code and I ran the code in "Code Blocks" IDE. if I enter m = 2 and n ...
[4 replies] Last: https://stackoverflow.com/questions/936687/how-do-i-declare-a-2d-array... (by againtry)
genericity
 
Hello, I'm french so please forgive me if the vocabulary doesn't fit the English standard. I'm tr...
[5 replies] Last: a constructor does not create more objects. if it is not in the code,... (by jonnin)
by janac
Incrementing iterator using an integer
 
My question is: why can't I increment a list iterator using an integer? Here's the error, which sa...
[9 replies] Last: Don't forget std::next() which can take a number of element positions ... (by seeplus)
by janac
Passing (?)constant iterators to function
 
I don't understand how to know the constant-ness of an iterator. Looking at the error message, it se...
[3 replies] Last: > are they constant references? Or is it that what they're pointing to... (by ne555)
Help: Invalid conversion error, MINGW
 
Hi, What is changed about thistiny func? This used to work earlier MINGW but now it hits an error. ...
[2 replies] Last: Hi, Thank you much. I try to compile it with MINGW. Let's see... (by JohnCage)
Establishing command keywords in an interpreter in C++
 
Hello, all. I'm kinda new here, working on a new little thing. I was curious as to the nature of com...
[10 replies] Last: Are you going to do lexical analysis to generate tokens and then synta... (by seeplus)
by Mif
How to modify numbers in file "C"
 
Hello.. I want to modify a file that contain numbers which are divided by ",". The numbers in file a...
[8 replies] Last: I think I may have a mistake.. at the end of every line I forgot I don... (by Mif)
Print one line to multiple lines with \n or space or fixed length
 
Hello, I would like to ask for your help to review my code. As the title, I would like to print o...
[6 replies] Last: Thank you, guys. Those solutions work expected and perfect. (by seal2002)
Command line about descending numbers using input numbers
 
I want to make a program by using the command line to descending numbers with an input of five numbe...
[7 replies] Last: Oh. It's supposed to use command-line arguments for the program. Well ... (by seeplus)
Form expression to tree printer
 
I want to create a tree viewer from postfix expression and of course I'm stuck. First the code: ...
[5 replies] Last: I guess it's just as easy to do it from the postfix form. #include <... (by DizzyDon)
January 2022 Pages: 123456
  Archived months: [dec2021] [feb2022]

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