Beginners - February 2018 (Page 14)

Why wont my read file open?
 
For some reason this code goes directly to the else statement. I have tried using the absolute path ...
[1 reply] : Nevermind sorry how can i delete this post (by hoobahstank)
by geo28t
Logic error?
 
So for this function, it is supposed to remove any duplicate elements in an array and replace them w...
[7 replies] Last: One obvious thing is that he clearly knows the STL. Better than wander... (by Thomas1965)
by unoino
Saving a char array into a char pointer for print function
 
What is the proper way to store a char array into a char pointer and printing it out ?right now it ...
[5 replies] Last: Fair enough. I would ask what that conversion really looks like in ... (by jonnin)
HELP with Writing c++ statements to find a positive value that is divisible by both 11 and 12. (using while loop)
 
Write c++ statements to find a positive value that is divisible by both 11 and 12. Use a while loop...
[3 replies] Last: then there is no sensible place for a while loop. You just check 11 &... (by jonnin)
Using find in a vector of strings to find only part of the string
 
I have a file that contains phone number mapping in the form of: 4475825 9876523 The idea is to re...
[no replies]
Pointers and memory locations
 
My code is to read from a file, the id, maths score and English score and determine each of their gr...
[3 replies] Last: a good and fair question! first, modern c++ greatly reduces the need f... (by jonnin)
2d array with random numbers program
 
Hi all, I was wondering if I could have some help with logic for the following program prompt: ...
[1 reply] : To give you an idea. #include <iostream> #include <random> int rand... (by chicofeo)
add 2 string number in c++
 
I have no idea why I can't compile my file // NOTE: The ONLY files that should be #included fo...
[9 replies] Last: > const int a, const int b, and also const int hsum. why do you put co... (by JLBorges)
by Dr4g
Printing an output after a variable input.
 
I would like to know how to to print Line 11 and Line 13 in the same line but to enter variable in ...
[2 replies] Last: I wanted to print the second statement right after entering a variable... (by Dr4g)
by Baluv3
Converting C filestream to C++
 
I have reconstructed a C code to C++ but I have no clue what to do with the file stream. but I want ...
[6 replies] Last: Can you do the same for other functions which has the reading from fil... (by Baluv3)
hex to dec in string
 
can someone explain it how it works? for example, A4h,for int base, does it mean 16^0 which is 1? b...
[3 replies] Last: c++ can convert string hex to int for you, if you didnt know that. Th... (by jonnin)
Structure and vector help pls!
 
Hi, I have a small problem when I use push_back to save a structure in a vector, the last value is r...
[3 replies] Last: Change auto point #include <iostream> #include <vector> #include <s... (by arielga96)
asking for input after computation
 
So i ask for input, user enters 50, then program displays 1-55 and outputs the sqrt of pi. After I d...
[1 reply] : If you don't want to enter "s" just remove the entire loop on line 80. (by coder777)
Need help with my C++ program please.
 
So everything checks out for the most part. The problem comes when I press N. I tell the user say to...
[2 replies] Last: Thanks for the reply and help. The N part was driving me crazy. I will... (by boypetey17)
Inheritance - out of scope error
 
For some reason my syntax is wrong and I'm getting an error. I am writing code to learn inheritance...
[1 reply] : Hi, Try this: #include <iostream> class Shape { public: virtual ... (by TheIdeasMan)
Create An Adjancy List from Txt File
 
Hello, I recently started coding in C++ and I am trying to create a graph.I looked up some tutorial...
[1 reply] : Something like this, perhaps: #include <vector> #include <map> #incl... (by JLBorges)
by logana
Problem with this code for an example of a Class.
 
I am using Visual Studio, 2015, and need help with this C++ code. The aim is to show a basic example...
[2 replies] Last: Sorted, all I needed to do was go into Project, options> and click C++... (by logana)
Recursive Binary Search
 
So i'm trying to write this recursive binary search but I need to do it with 3 arguments within int ...
[2 replies] Last: So I channged to this #include <iostream> using namespace std; int... (by matapexxxX)
Question ?
 
Hello , im new in the C++ world so my teacher ask me for a program and he type like this in the ...
[2 replies] Last: Thanks (by yepicubef)
How to add in commas to output after reading a number from a file?
 
For example, the file says 13144 After reading in the number, how do I print it out so it says "13,1...
[2 replies] Last: I'm assuming it's ok to use the Standard Library for this(since the as... (by awong918)
February 2018 Pages: 1... 1213141516... 28
  Archived months: [jan2018] [mar2018]

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