Beginners - October 2019

Text File to a 2D Array
 
I have a text file that contains a list of IDs and sales amounts. I need to read it into a 2D array....
[7 replies] Last: Using the data file contents previously posted: #include <iostream> ... (by Furry Guy)
Finding the average number from a file
 
I am trying to find the average of all the numbers of 2 files (numbers1.txt & more_numbers.txt). The...
[2 replies] Last: Consider writing a few (reasonably small) functions. For example: #i... (by JLBorges)
Overwriting the same node when loading file
 
I'm working on a project for class, and I was having problems with memory errors (fixed it, deleted ...
[7 replies] Last: Ah, I see, thank you for explaining. I was actually following an examp... (by FeedMeTacos)
Want to prevent a duplication of a header file.
 
How can I prevent the duplication of stdlib.h in main.cpp? // AllocateVector.h #ifndef ALLOC...
[9 replies] Last: I am sorry for him. (by shafiul0304034)
Else without a previous if
 
Hello. I meet a problem in my code(fragment of a code): if(calitate == 0.065 && esantion_dublu ...
[5 replies] Last: Directly comparing floating-point values for equality is very error ... (by Ganado)
by cash
sorted insert
 
I need to insert a node into a sorted link list, but I'm getting errors. Can someone help with whats...
[2 replies] Last: You can handle both special cases that salem c brings up by using a po... (by dhayden)
Equation program
 
Hello I'm begginer in C++, and I need to make a program to calculate this equation. Can anybody help...
[5 replies] Last: if k is small you can just do a simple loop where you grow factorial r... (by jonnin)
Accepting Hyphens in String
 
Hello, I'm a student just beginning to learn C++. My current task is to write code which will accep...
[7 replies] Last: Thank you, I've figured it all out. You've helped me realize that whe... (by willsmek77)
deadlock with mutex lock
 
please tell me how to execute this piece ofcode epthread mutex t first mutex; pthread mutex t se...
[2 replies] Last: actually i dont know which library i should include in this code (by arslanjafer)
creating operating system
 
Start here: https://wiki.osdev.org/Expanded_Main_Page Good luck :)
[1 reply] : Looks like a doublepost of http://www.cplusplus.com/forum/general/2647... (by keskiverto)
Suggested improvement to C++ Language Tutorial
 
I have not used C++ for many years and I am following your tutorial to refresh and update my knowled...
[6 replies] Last: a reference is LIKE a pointer in many ways, but is not a pointer. ... (by Repeater)
Building a Logic!
 
What's Logic Behind this sequence 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211.... !? I ha...
[4 replies] Last: Yes, @Ganado! #include <iostream> #include <string> using namespace ... (by lastchance)
Can't seem to call string in instance
 
I am very new to C++, I have been struggling with functions calling from classes. I have been workin...
[3 replies] Last: #include <iostream> #include <string> using namespace std; class dat... (by lastchance)
Problem about class constructor
 
When the class constructor called another class constructor, the value of the a,b,c is not changed b...
[2 replies] Last: Thanks for your helping!! (by miku831)
C++ array issue
 
I know I'm overlooking something trying to build this mad lib simple but my array is starting at th...
[1 reply] : Why are you dynamically allocating your array? You can just do const ... (by Ganado)
Did you guys see any mistake from this small code!
 
Write your question here. For some purpose, i need to use malloc() function to allocate a 2D arr...
[14 replies] Last: ok Sir. (by shafiul0304034)
error in do...while, help
 
#include <iostream> using namespace std; int main() { int s; int sks1,sks2,sks3,sks4,...
[2 replies] Last: 1. You should have made case 1 work first, before copy/pasting the sam... (by salem c)
Some of C functions do not work in C++
 
Hello, I have next code in main.cpp: #include <iostream> #include <stdio.h> void main(void) {cou...
[3 replies] Last: Keskiverto has already shown you how to do that. If there are things ... (by MikeyBoy)
HOW to change value of a number present in a string
 
string: this is a 79 pc output that i want: this is a 200 pc
[1 reply] : echo "this is a 79 pc" | sed s/79/200/ That, obviously, is not C++ b... (by keskiverto)
by Bopaki
Asking for help about correctly writing this constructor
 
In the baseClass there is only the default constructor binaryTreeType(); //default constructor ...
[2 replies] Last: hint: a constructor is called when an object is constructed do you not... (by ne555)
October 2019 Pages: 123... 18
  Archived months: [sep2019]

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