
please wait
by lost110
Inserting node at the beginning in linked list
|
Hye, everyone! Is this the right way to add a node in the beginning? The code is running fine! Thanks #include <iostream> using namespace std; struct abc {... |
Aug 31, 2019 at 10:12pm
[2 replies] Last: Is this the right way to add a node in the beginning? No. When head==N... (by dhayden)
|
by highwayman
Class prototype
|
how do you make the prototype of a class? I’m pretty sure I’ve seen it before but I’m not sure how it looks, the reason is I have two classes that have ea... |
Aug 31, 2019 at 8:43pm
[2 replies] Last: What’s a adjacency list? How is that challenging to do correctly? W... (by highwayman)
|
by PeeweeTuna34
Input Validation with integers
|
I'm a beginner in C++ and I'm currently practicing. I am trying to write a code that accepts only a five digit integer user input. For instance, the user inputs... |
Aug 31, 2019 at 3:28pm
[2 replies] Last: You need to state your actual problem (and show some code). A suggest... (by lastchance)
|
by knore1994
Thinking to Get C++ Certification Exam Practice Questions with Answers
|
I am thinking be be C++ certified, is there any place I can get exam practice questions with answers? |
Aug 31, 2019 at 1:24pm
[2 replies] Last: Personally, I'd be skeptical of a C++ certification. If I were hiring,... (by dhayden)
|
by surfersss
complexity of build heap in heap sort
|
I'm trying to count running time of build heap in heap sort algorithm BUILD-HEAP(A) heapsize := size(A); for i := floor(heapsize/2) downto ... |
Aug 30, 2019 at 10:48pm
[9 replies] Last: on phone, bard to type... Accidental typo, or deliberate. Either wa... (by deleted account xyzzy)
|
by GerryWolff
Problem with getline()
|
I have a problem with this C++ code: ifile has been opened successfully. ... std::string str; ... ifile.ignore() ; // This appears to be necessary std::getli... |
Aug 30, 2019 at 4:02pm
[3 replies] Last: Hello GerryWolff, I have revised your code a bit. The comments should... (by Handy Andy)
|
by sarah1993
Swapping two random numbers
|
Hi everyone, I'm new to C++ programming language. This post is a continuation of my previous post (http://www.cplusplus.com/forum/beginner/257709/). Looking a... |
Aug 30, 2019 at 5:00am
[9 replies] Last: Thank you Jonnin for your suggestion and explanations. I will study... (by sarah1993)
|
by TheJast
file not being read in
|
I made some of the recommended edits and it still isn't changing those errors. I think it has something to do with my readem function i dont think it's reading... |
Aug 30, 2019 at 4:19am
[2 replies] Last: Make crn, credithours, and numstu initialized with zero in the struct.... (by poteto)
|
by notacoder
sum of the GCD of all the subarrays
|
what is the most efficient way to find the sum of gcds of all the subarray without using tabular DP(as the memory constraints doesn't allow to form 2D array) |
Aug 29, 2019 at 11:16pm
[12 replies] Last: [quote=notacoder]Can you write the code implementation of the above ex... (by dutch)
|
by GerryWolff
Problem with #include <ifstream>
|
I have the following lines in my program: #include <fstream> #include <ifstream> #include <ofstream> After ‘building’, Visual Studio says abou... |
Aug 29, 2019 at 1:40pm
[7 replies] Last: compared with other versions may be "very very old". I was talking ab... (by jonnin)
|
by f4rr3l
help me plz im noob
|
Hi guys i have a homework of c++ and i cant it, anyone can help me, i just need choose 2 exercises of 3. , anyone help me with the c´++ codes plz 1.Implemen... |
Aug 29, 2019 at 1:36pm
[2 replies] Last: 1 is fairly easy. A portion of what you need may look like this: strin... (by jonnin)
|
by GerryWolff
C2146 Syntax error
|
I have the following lines in my program: #include <fstream> ... extern void LANG1_main(); extern ifstream ifile; extern ofstream ofile; After b... |
Aug 29, 2019 at 11:13am
[2 replies] Last: Thanks for this. By a bit more digging, I'd arrived at much the same c... (by GerryWolff)
|
by stoneJax
Iterators
|
I have to rewrite some code using iterators. The code will reorganize names and scores into descending order. I have gotten a start on it but am feeling lost. ... |
Aug 29, 2019 at 7:46am
[12 replies] Last: Thank you guys for the help! (by stoneJax)
|
by GamaByteLuke
What Do I Put?
|
Hello. I'm a bit new to C++, so forgive me if it's a bit choppy. I am trying to make a program that takes 10 integers, and COUTs the sum of the negative numbers... |
Aug 29, 2019 at 2:11am
[5 replies] Last: Hello GamaByteLuke, I was working on the following code before I see ... (by Handy Andy)
|
Why the move constructor is not used? |
#include <iostream> struct X { int * data; X() : data(new int ) {std::cout<<"default_constructor\n";} ~X() { delete data; std::cou... |
Aug 29, 2019 at 12:54am
[12 replies] Last: Whoops, I typed without really thinking about the details of what I wa... (by Albatross)
|
by XboxOne2019
Nested function calls?
|
We have a program to do where you have to find the largest and smallest number in 5 values. I was able to make the smallest work using what our teacher calls "n... |
Aug 29, 2019 at 12:43am
[7 replies] Last: For future reference, you can deal with lists of things by splitting o... (by Duthomhas)
|
by ElusiveTau
struct nested in a union nested in a struct
|
I'm reading about the OVERLAPPED struct: https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-overlapped I know that a struct is es... |
Aug 28, 2019 at 9:44pm
[11 replies] Last: I wish c++ had embraced the de-facto union access. Its prettier than... (by Niccolo)
|
by djfr33
Needing help I am new to this.
|
Here is the problem I am working with.....If there are 18 people in your class and you want to divide the class into programming teams of 3 members, you can co... |
Aug 28, 2019 at 6:19pm
[5 replies] Last: [quote=djfr33]Jonnin it is supposed to be working off of doubles. Th... (by lastchance)
|
by anarelle
Are parameters by reference automatically "dereferenced"?
|
I had never thought of this before, but I noticed that the & operator behaves differently when used as an "address of" operator and as a reference parameter. E... |
Aug 28, 2019 at 2:49pm
[3 replies] Last: I suspect that they just ran out of symbols to use. Everything you can... (by Duthomhas)
|
by Bopaki
Help as to why am I getting this error message
|
I am starting with linked lists. I get these errors when compiling this program: Compiler: Default compiler Executing g++.exe... g++.exe "C:\Dev-Cpp\buildLi... |
Aug 28, 2019 at 9:36am
[4 replies] Last: Lines 18 to 20 should look like this void *list::buildListForward() ... (by salem c)
|