General C++ Programming - October 2019

using pointers as members of struct
 
i want to use pointers as member of struct..my prgram should read ISBN numbers of multiple books from file #include<iostream> #include<fstream> using nam...
[4 replies] Last: Your program has the following bugs and shortcomings. All of these wou... (by dhayden)
linear feedback shift register
 
I am dealing with Linear Feedback Shift Register. Most of the codes that I found are written in C. Is anyone has an example of LFSR using C++? Thank you.
[4 replies] Last: If C++ and C can be combined, how it can be worked? Is there any examp... (by jonnin)
ECMAScript assertions: how to specify the maximum number of matches of a certain character class?
 
Hi, I want to modify the following regular expression: // string: "Ab,CDf" // reg expr: "(?=.*[[:lower:]])(?=.*[[:upper:]])(?=.*[[:punct:]]).{6,}"...
[3 replies] Last: Actually, the greedy match (no question mark) is a better choice in th... (by mbozzi)
by LHHH25
Program Help
 
I need some help on how to properly execute this program Input/Output 1- Create an input file with several numbers. 2- Read the numbers from your fil...
[3 replies] Last: I did it!! I met the challenge!! Hooray!! Huzzah! *cheers!* Gotta ... (by deleted account xyzzy)
Do not understand a regular expression using default grammar
 
The regular expression is: auto pattern{ R"(^\s*(?!#)(\w+)\s*=\s*([\w\d]+)$)"s }; The part I do not understand is the group (?!#) - it is supposed...
[4 replies] Last: @salem c, thanks for the link. regex searches have always looked rath... (by deleted account xyzzy)
by Ric
Stuck on a problem (1,2)
 
I need help with writing a program that initializes an array of characters with the phrase, “Take me to Clearwater Beach!”. Using pointers, scan the arra...
[30 replies] Last: For example, a program that simply sent the string literal "Hello Worl... (by helios)
iostream string
 
why doesn't work the following code?( I want to use char and not the class string) #include <iostream> using namespace std; int main(){ char *a; cout<<"inse...
[5 replies] Last: @Cubbi, I don't agree that is a defect, just a more "relaxed" way to d... (by deleted account xyzzy)
lab using dynamic memory
 
below i have code where i am asked to fill in some information #include <iostream> using namespace std; const int MAXNAME = 10; int main() { ...
[2 replies] Last: There are problems with your code, even though you don't actually ask ... (by deleted account xyzzy)
Need some explanation.
 
My code is like this: struct Performer { string name; double scores ; double final; }; int main( void ) { int n; Performer stu; ...
[1 reply] : Change the return type to what you really want to return: Performer ... (by coder777)
by Dee5
Changing file extensions.....
 
The flash disk contents are in a folder named “flash-disk”. Please help me create a program that can visit each folder and its subfolders in the “flash-di...
[1 reply] : Please do not make duplicates. http://www.cplusplus.com/forum/general... (by fiji885)
dynamic arrays
 
i understand the general concept, the last 2 labs i did on my own, here's one where I am trying to get it to run #include <iostream> #include <iomanip> ...
[2 replies] Last: Using code tags makes reading and commenting on your code MUCH easier,... (by deleted account xyzzy)
no constructor exists to convert datatype to queue of datatype
 
I'm trying to enqueue the ints and doubles for the queue of ints and the queue of doubles. But there's 2 errors of that problem. How can I fix this? #include...
[4 replies] Last: Let me fix this error and I'll have the updates. Thanks. (by mlanuri10)
Lab Assignment Help
 
I currently need help with a C++ lab assignment and it would be greatly appreciated. The assignment states: You are provided a function (RollDice) that w...
[6 replies] Last: The assignment in the original post states: You are to keep a count of... (by BlasianKid)
chrono::time_point object is supposedly a struct.
 
I need to make a variable with the type std::chrono::time_point. How would I do that?
[1 reply] : #include <chrono> std::chrono::time_point tp; (by doug4)
Random Character Program Assignment!
 
You must follow these requirements exactly. Your program must loop, asking for character names that may contain spaces, until the word "quit" is entered. Each...
[3 replies] Last: Your program must loop, asking for character names that may contain s... (by kbw)
Can you initialize an object within an object taken as a parameter?
 
I have a header which allows the class to take another class of the same type as a parameter. Calling the functions of the parameratized object works just fine ...
[4 replies] Last: Thank you all. I don't know why I didn't think I could access the node... (by vaderboi)
by zolo
Extract a vector from a vector of vectors
 
Hi, I have to work with medium large data files. They are anything from 1 to 1024 x 262144 doubles. Of course at any one I do not use all of them (not at the...
[4 replies] Last: Thanks for the great examples. Nice. All of them work like charm. (by zolo)
by cgm2k7
help from loop
 
Hello! Good night everybody! I am "trying" to develop a fighting game in SDL2 c ++, I have the following problem: I have a 10 position loop where each pos...
[3 replies] Last: I don't think I explained what I wanted to say, sorry ... I used the t... (by cgm2k7)
Structures and Arrays
 
I need help with the following question: Design a structure Student containing the following members: 1) First Name; 2) Last name; 3) Date of birth (it should ...
[7 replies] Last: Sorry guys, this is what I have edited, still incomplete but I'm worki... (by Anton12304)
Structures and Arrays Question
 
I have completed most of the problem I've been working on so far. This is the full question (1-4). I am having trouble with parts 2-3. This is the question: ...
[2 replies] Last: Latest discussion: http://www.cplusplus.com/forum/general/264672/ (by helios)
October 2019 Pages: 123... 10
  Archived months: [sep2019] [nov2019]

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