Beginners - February 2018 (Page 26)

by RanGH
How to get information from .txt
 
Hello everyone. I'm tryng to code but need some help, its about ifstream and ofstreams. I have some code. ofstream numbers; numbers.open("MyNumbers1.txt"); ...
[4 replies] Last: ty Andy. (by RanGH)
Hello :) I want to know how to make this plss
 
How to design a program that will compute for the value of x in the given equation below. Assume that the variables a, b, c, are to be entered by the user. th...
[4 replies] Last: a reason more for him to first explicitely type his operators lol (by barnack)
by Ephan
Printing hollow square and triangle
 
Hi guys. When it comes to printing rectangles (regular or inverted) and squares, the logic jumps into my mind and I can write the code pretty quickly. Here are ...
[1 reply] : Within your existing inner loops, if you are at one of the limits in e... (by lastchance)
by kayo2
File pointer not going to right place
 
I am trying to convert between Arabic and Roman numerals based off of what the line in the file gives me. My problem is that the file get pointer is going to fa...
[3 replies] Last: Something like this, perhaps: #include <iostream> #include <string> ... (by JLBorges)
program to average 5 test scores
 
I am writing code to average 5 test scores inputted by the user. I have been unable to even run the code since I have build errors. #include <iostream> us...
[1 reply] : Of course you have errors. Let me be you, and you be the computer. I'm... (by barnack)
Using modulo for a caesar cipher
 
I'm only a couple of weeks into semester and I have no prior experience so I'm the beginner of the beginners. In fact, the code below represents most of the kn...
[2 replies] Last: The 57 was a typo, not just here on the forum, but that's how it copie... (by atmetal)
Help Adding 2 word choice
 
I am working on this program for class. I have it working fine, but when I try to add a game with 2 words it will only add the first word. What am I missing? ...
[2 replies] Last: Thanks Joe. I just found that as well and got it working :) #includ... (by monasmith529)
C Help.
 
Hello, I am trying to read integer from a .txt file and then store the integers in the allocated array using malloc(). My thought is as following: #include <s...
[1 reply] : Posted here as well: https://cboard.cprogramming.com/c-programming/17... (by Thomas1965)
Font size
 
Hello everyone, My question is simple. Is there a way to print different sized text in console one after another, somethin like: /command/ printf("Hello"...
[2 replies] Last: Yea i figured i will have to do something like that. Thanks non the le... (by niksacokica)
help with bitset
 
Write your question here. I need help taking the result from a bitset and move it into a array what i do is fwrite(&binn1, 4, 1, fh2); this write it to a ...
[2 replies] Last: Learn that the hard way. but the assembly part of my code is working a... (by nickhere)
by Rodev
Compiling with C++17 on Mac OSX using Terminal
 
Hello, I always use my terminal app to compile my C++ programs. I use a Makefile, so I find it quick. As editor, I use Atom. However, I can't compile usin...
[4 replies] Last: @Ganado, I finally know how to see the command generated by Xcode. I ... (by Rodev)
Hello, I'm new in C++, and I would like to know, How I do this?
 
Hello, I'm new in C++, and I would like to know, How I do this? computeTax() In order to determine the tax burden, it is necessary to project the monthly in...
[1 reply] : Examples of syntax: http://www.cplusplus.com/doc/tutorial/functions/ h... (by keskiverto)
question about iterator and algorithm
 
my function is not working i want it to print out and i have to do it using only iterator and algorithm library and i also look at copy for algorithm and not su...
[1 reply] : Your list called example contains objects of type "practice" (whatever... (by lastchance)
The last number in my input file replaces all the numbers in my array.
 
When I assign a number for a section of an array it works.I know this because I output the data and it outputs what I have in my input.txt file.However, when I ...
[3 replies] Last: What do you mean when you say I am accessing my array out of bounds? ... (by jlb)
Lambda Expression
 
Please explain what lines 13 and 14 do. 1. I don't understand what if constexpr (sizeof...(ts) > 0) does. 2. What [=](auto ...parameters) { return ...
[8 replies] Last: Thank you TheIdeasMan for your research. The links help me to underst... (by phztfte1)
cannot paste code in VS
 
I am not sure what happened, I am not able to use the paste command in VS Enterprise 2017. Its greyed out.
[1 reply] : Do you have a file open to paste into? (by jlb)
Reading in whole lines from file instead of word by word
 
I am able to read from the file I want just fine but the issue is it is read in word by word. So it comes out as: John Smith, 5, 10, ... When in th...
[2 replies] Last: Thank you! (by priscilla96)
How can I use function call in this situation?
 
In my code, I have a typedef struct like this: typedef struct { double balance; //US $ amount remaining in your account. double coins; //Number ...
[2 replies] Last: Thank you so much for your help! I tried and it worked. (by vuanhachoi)
quesiton about <algorithm> and <iterator> libraries
 
<algorithm> and <iterator> libraries is there like an add function im looking through the libraries don't understand which one i should use for a class object...
[3 replies] Last: If it's a std::list then you can use push_back(), push_front() or inse... (by lastchance)
"Touches" Function
 
Hi there, I created a function for me to use in sfml that checks whether or not something is in the radius of another thing. Here is the function: float...
[2 replies] Last: Alright, thanks dhayden, I'll keep looking for an error elsewhere in m... (by Optimistic Peach)
February 2018 Pages: 1... 2425262728
  Archived months: [jan2018] [mar2018]

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