Beginners - September 2017 (Page 15)

file created but no contents
 
The code inputs values but when i go and open the dat file created with notepad its shows nothing #include<iostream> #include<fstream> using namespace s...
[2 replies] Last: In the original code, the file is opened twice. The second attempt wil... (by Chervil)
reading in with cin
 
Hey! So when i run a program, it runs but when it gets to reading in a value for cin it just ends the program without reading it. I was wondering why because i ...
[1 reply] : Without a compilable example of your code, it’s hard to guess the ex... (by Enoizat)
non-existing cpp file in an open source project
 
I downloaded a c++ project and a "config.h" is included at the top of it, it also runs without any problems but I can't find neither the config.cpp nor the conf...
[3 replies] Last: I’ve downloaded and extracted on my W7 machine the file libcaca-0.99... (by Enoizat)
Classes with Other Classes as Member Data
 
Write your question here.
[no replies]
by Bopaki
'noOfRegions' was not declared in this scope
 
I am trying to compile an example program from Malik chapter 10: Election Results and I am getting the error below: 4 0 C:\Dev-Cpp\MalikChapter10\main.cpp In...
[3 replies] Last: Thank you both Chervil and Handy Andy. I only had to add in this line... (by Bopaki)
Help me, fix this simple program
 
Guys, how i can use space in string? try this code lest you know #include<iostream> #include<conio.h> #include<string> using namespace std; main() {...
[5 replies] Last: #include <iostream> #include <string> // #include<conio.h> <-- conio... (by Enoizat)
file not displaying
 
Inputs values but doesnt display them #include<iostream> #include<fstream> #include<string.h> using namespace std; int main() { int rno; fs...
[2 replies] Last: After opening a file you should check that it is open before you use i... (by Thomas1965)
Implement strtok without modifying string?
 
Hi strtok works by replacing references to the token with a NULL pointer so that the string argument is itself modified. Often this is an undesirable consequ...
[6 replies] Last: For immutable strings, the alternative would be to directly use strpb... (by JLBorges)
by SasuKe
How to turn this into a function
 
Hi, can someone help me make this into a function please. Is it possible to make one function to traverse the arrays and another function to check the condition...
[3 replies] Last: You can make a function that will return a bool. Then another function... (by Hengry)
file read and display
 
Code inputs values but displays only last name 3 times and all roll numbers displayed are 0. #include<iostream> #include<fstream> using namespace std; int m...
[3 replies] Last: ooooh thanks.while loop is so much better (by closed account 1vf9z8AR)
help needed asap thanks
 
I want to display odd no then even no then odd no then even no then even no which are entered by person.But first contents of odd are displayed then even disp...
[3 replies] Last: thanks i like that if else loop (by closed account 1vf9z8AR)
Function Help
 
Hello, I am currently practising functions here and am a bit confused onto the output of my program. I am returning string functions here, and as you can see I ...
[2 replies] Last: Huh, that's really weird. So really it's just undefined behavior that ... (by Bayan Khorshidi Berkeley)
Array help!
 
Hey! so this is a part of ym assignment : The user will be prompted for the three fields: productID, price, quantity on hand. Then the information may be adde...
[7 replies] Last: It did!! thanks :D (by wajahatshoukat)
using overloaded == to compare between both int and char
 
I'm attempting to use an overloaded bool operator "==" to compare between both int and chars. in all disclosure: yes--this is a portion of an assignment wh...
[11 replies] Last: With the class Strange as written, talking about promiscuity (access... (by JLBorges)
Input help!
 
I'm not sure where to start, please help. Implement a program that: Get the following from the user (no prompts): first name, last name, birth year, ...
[4 replies] Last: Hello cowboys18, I have been trying but I can't get it to work Pos... (by Handy Andy)
Need help on pointers and dynamically allocated arrays.
 
Hello this is for an assignment. I'm not looking for the answer but rather a point in the right direction. The areas where I have comments are places I still ne...
[4 replies] Last: sure you do :) int *arrayPtr = NULL; cout << "How many test scores... (by jonnin)
Why you use c ++ so skilled. Is English the mother tongue? The damn Italian brags.
 
How do you learn c ++? I am very confused
[4 replies] Last: Think of it as payback for having to learn Italian keywords when lea... (by kbw)
by kg98
Random Numbers Assignment with error found
 
Hello, so I was assigned to write a program that allows a person to input two numbers and find the sum of the two. My teacher gave us the beginning of the cod...
[1 reply] : Either do this: unsigned seed = unsigned(time(0)); Or ditch the v... (by Golden Lizard)
C++ Selection sort and Binary Search help
 
Write a program that lets the user enter a charge account number. The program should determine if the number is valid by checking for it in the following list:...
[2 replies] Last: A binary search requires a sorted list. You need to call your sorting ... (by liuyang)
by Sentoo
Arrays to Vectors
 
Hey there, In order to be as organized as possible, according to my prof., vector is required to become organized. I am having trouble and do not know what m...
[1 reply] : the things you need to do to start are: #include<vector> ... struc... (by jonnin)
September 2017 Pages: 1... 1314151617... 21
  Archived months: [aug2017] [oct2017]

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