Beginners - June 2016 (Page 23)

Read a line of text at a time and format it
 
I will be having input files that are supposed to be formatted like this xxxxxxxxx,xxx xxxxxxxxx,xxx xxxxxxxxx,xxx Where the first set of 9 numbers is a i...
[1 reply] : You can use the setw() and setfill() manipulators to help format that ... (by jlb)
by cibide
microsoft visual c++ runtime library debug error
 
Hi guys! This code is giving me trouble 'couse always get the error on title. Can anyone explain why? #include "stdafx.h" #include "../../std_lib_facili...
[2 replies] Last: ty :) (by cibide)
Wide strings not printing properly
 
Hi I have written a small program to test if wide strings print properly: ... ofstream fout; /// O/P file ... fout << "raw string...
[1 reply] : Wide string output requires using the wide string output stream method... (by closed account E0p9LyTq)
Move constructor not being invoked
 
Hi I have written a simple container class named Vector, to check if copy semantics and move semantics are working correctly. I have inserted code in the ...
[1 reply] : Copy elision? http://en.cppreference.com/w/cpp/language/copy_elision (by JLBorges)
by ohg
Segmentation Fault
 
I code is having segmentation fault but i don know how to fix it. I need some help. Thank you. #include <iostream> using namespace std; int calculat...
[3 replies] Last: In addition to all the for loops you also need to change line 65. (by Peter87)
Is there a way to send the STL container cross process?
 
As the title said, I found the link below but seems inapproperite for my question. http://stackoverflow.com/questions/22797418/how-do-i-safely-pass-objec...
[1 reply] : Boost Interprocess has standard library compatible allocators and cont... (by JLBorges)
by Bopaki
This program copiles okay but gives no output
 
Write your question here. Can someone make me understand why this program gives on output? Put the code you need help with here. package Lists; //Let's loo...
[6 replies] Last: Thank you skaa. it worked fine. You are my star!!! (by Bopaki)
[Error] expected primary-expression before ....
 
Need help expected primary-expression before 'manufacturer','type',...... #include <iostream> #include <string> #include "Car.h" using namespace st...
[3 replies] Last: Create a variable. Use cin to read a value from the user and store it ... (by Peter87)
Scripting Languages on top of programming languages
 
So I've had this question lingering around in my head for quite a bit and it's starting to bug me. Many projects (mostly corporate) use many languages to work o...
[no replies]
Formatting
 
Hello all! I was supposed to write a program that ask for an input of 4 numbers and it uses Boolean functions to tell if certain thing about a character is true...
[1 reply] : If you don't want it on a new line omit the '\n' (new line character... (by coder777)
by feeks
Coin flipping
 
"Write a program that has a function prototype before main and an implementation of the function after main. The function to be implemented is a coin toss simu...
[6 replies] Last: When I ran yoiur code it gave me LNK2019 Error. unresolved external s... (by AbstractionAnon)
What does this line mean in Quick sort?
 
I'm so confused at the partition() function, this code is guerranted to work #include <iostream> #include <vector> using namespace std; void quic...
[2 replies] Last: Oh silly me your right! Thanks :) (by Leo Mingo)
I have no clue were to begin this code
 
Your weight is actually the amount of gravitational force exerted on you by the earth. Moons gravity is one sixth (0.167) that of the earth gravity. Write a pro...
[7 replies] Last: @Chervil: Woops! silly mistake. Fixed. Thanks. (by Arslan7041)
How to fstream parse file in stream?
 
What do I have to do to create a live stream from a file (log.txt) where the log file is still filling. ifstream file("C:\\Users\\user\\Desktop\\log.txt...
[3 replies] Last: When you get to the end of the stream, pause for a second or two, then... (by dhayden)
Need help with a program.
 
The Fast Freight Shipping Company charges following rates Weight of Packages (pounds) Rate per 500 miles Shipped 2 => weight $1.10 2 < weight <= 6 $2.20 6 <...
[3 replies] Last: Line 14,56: The instructions state the weight is in pounds. You're a... (by AbstractionAnon)
Need help with variables
 
I'm trying to make a simple program to state minimum and maximum of 3 numbers using nested if else statements I've got everything solved i think except when i t...
[4 replies] Last: @OP, take a look at this link : http://www.cplusplus.com/doc/tutorial/... (by chicofeo)
Help with "while"
 
I am brand new to C++ and can't figure out for the life of me what is going on with this code. I am struggling as to the reasoning behind the console output alw...
[2 replies] Last: Duoas, Thank you so much!!! It finally makes sense and you also taug... (by LParrette)
getting error with else if statement
 
I am getting an error with the else if statement. It is underlining the else and saying expected a statement. Could someone tell me what i am doing wrong thanks...
[3 replies] Last: The errors are at line 38: missing closing brace } and line 43: extr... (by Chervil)
Poker game.
 
This was an assignment I had to do a while ago and already submitted. It is a simple poker game that the user and computer can play. I'm sure there is a way b...
[1 reply] : My first suggestion is that you use code tags when posting code. Next... (by jlb)
What does [](int) mean?
 
What does (int) mean? namespace Extended_STL { // … template<typename C, typename Predicate> Iterator<C> find_if(C& c, Predicate pred) { return st...
[2 replies] Last: Thanks a lot :) (by Leo Mingo)
June 2016 Pages: 1... 2122232425
  Archived months: [may2016] [jul2016]

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