General C++ Programming - January 2019

Tennis game
 
hi I am new to c++ and having problems programming a certain code, any sort of help would be greatly appreciated. Write a C++ program using functions to simu...
[5 replies] Last: Nobody is appreciating your snarkyness undrdog. I was gonna ask you if... (by poteto)
std::chrono gives me always 0? Under compile flag -O3
 
Here I scan a very large vector, which has more than 1 << 16 elements. vector<vector<vector<uint64_t>>> table_portions: a vector of tables (here a vector of ...
[8 replies] Last: In a separate source file, put void dummy(uint64_t x) {} In your i... (by dhayden)
question
 
according to the following simple task: Write a c++ class called 'student' with Data members: name(char type), marks1,marks2 (integer type) The program asks the...
[2 replies] Last: Thank you for your reply (by Makan11)
generating a regular Grammar program
 
Hello, All Help with the task please: This is the program for generating a regular Grammar. Input Program: The language, mandatory final chain, multiple...
[1 reply] : For the love of god, please use code tags (<> icon on the right of the... (by H00G0)
Looking for material online
 
I want to practice c++ dynamic memory allocation. I want some questions to do programming and also have solutions to correct my program. Can anyone help me by t...
[2 replies] Last: dhayden's suggestion is good. You should try writing your own linked l... (by Uk Marine)
No Value Is Accepted
 
char guestType () { char type; cout << "Enter M if you are a member or N if you are not a member."; cin >> type; while (type != 'm' || 'M' || 'n' || 'N...
[3 replies] Last: while (strchr("mMnN", type) == nullptr) http://www.cplusplus.com/re... (by Peter87)
Using Header File
 
Hi All, I have bunch of header files , which include each other . Example : file1.h will have #include<temp/file2.h> file2.h will have #include<tem...
[3 replies] Last: Thanks @Ganado .. It worked @MikeyBoy Thanks for reply. Actually i ... (by nekkoMaster)
Declaration of a fixed-size vector within a class
 
Please could someone explain why A, B and D can be legitimately declared in the following code, but C can't. #include <iostream> #include <vector> using...
[10 replies] Last: Thumbs up to you pal. You rock. 😊 (by Grime)
add, multiply, subtract, divide
 
Hey guys, My assignment is to do simple add, subtract , multiply and divide. The user gets to choose what they want to do by choosing from the menu. I have done...
[5 replies] Last: It sounds like you want the code at lines 62-72 to run at line 116. A... (by dhayden)
what does X&& goo() mean ?
 
I am reading (and trying to understand) this article: http://thbecker.net/articles/rvalue_references/section_05.html at some point the author mentions X&& go...
[7 replies] Last: easy to get confused. true, and it makes it even harder that the con... (by Cubbi)
A container finding which can be resized smaller
 
Hi everyone. I want to find a container, which at first be allocated very large. (with Intention to be large enough to contain my things) Then I fill it but d...
[3 replies] Last: careless overuse of this will make performance sluggish, but occasiona... (by jonnin)
by lety19
Display 1 number after comma
 
Hello, I am a person without programming skills, but I need for a project to display for the begining one number after the comma. My current program display...
[7 replies] Last: Thanks for the info! I will try it as soon as possible :) (by lety19)
Looping Menus
 
Could anyone help me figure out my do while loops? I am trying to make the first menu to loop continuously until you choose to exit. Menu2 does this but I want ...
[6 replies] Last: It looks like you figured it out. I did the same thing with one of sal... (by dutch)
valgrind LEAK SUMMARY: definitely lost with malloc
 
I got LEAK SUMMARY: definitely lost from valgrind. But as a beginner with valgrind, I do not know to handle this problem. I think it should be good, when I am u...
[14 replies] Last: Can you explain you code little bit What's unclear about the example... (by mbozzi)
far Pointers in C programming. Solve the code
 
The following codes works perfect in TurboC3.0. How to run this in VS2010. Advance Thanks to all. #include<conio.h> #include<stdio.h> void main() { ...
[3 replies] Last: [quote=farooqDeveloper] How to run this in VS2010. This cannot run in... (by Cubbi)
chessboard
 
Hi guys! i want to make a chessboard with c++. i dont know very well how to start it. Guide me !!
[3 replies] Last: Sorry for that. I just needed a really fast response... (by s l i m)
DOS Level Programming (findfirst function)
 
Hello everyone! I did C/C++ programming in Borland C and TurboC 3.0 IDE. Now I am doing it in VS2010. But I tried a lot to find the function findfirst() in VS2...
[8 replies] Last: Yes NT4 was the predecessor 2000. During this period there were two b... (by jlb)
What could be a better way to find if two (or 'n') particular values are present in a binary tree or not ?
 
Hi ppl :), I have a solution to find if two values are present in a tree. I would like to know if there is a More efficient way to do this ? More el...
[8 replies] Last: Thanks a lot for your suggestions, @JLBorges, @jonnin & @dutch:) (by kapil2905)
by a10e29
Pointer Odyssey
 
Hi there, How do I serialize a pointer so that when I deserialize my file my objects are returned to the "same" pointer? I've been struggling with this for a w...
[2 replies] Last: My own library. It handles general graphs and class hierarchies with ... (by a10e29)
Is RTree updated automatically in Boost geometry?
 
Dear all, I am now using Rtree in boost geometry. I contained pointers of spatial geometry data into RTree, whose coordinates are changed during computation...
[3 replies] Last: Dear coder777 and TheldeasMan, and all Thank you for your reply. Yes... (by Mitsuru)
January 2019 Pages: 123... 7
  Archived months: [dec2018] [feb2019]

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