Beginners - September 2019 (Page 10)

by coco28
Store Data into Array
 
I've created a random number generator that places numbers 100-200 into a text file and now I want to store the random numbers from that file into an array. ...
[4 replies] Last: Thank you so much for taking the time to give me direction on this. (by coco28)
What is crtexe.c? Is it specific to the Visual Studio?
 
What is crtexe.c? Is it specific to the Visual Studio?
[1 reply] : When the OS runs your compiled C++ program, the first line of main() i... (by salem c)
How do I write a loop in my code? I tried to but didn't work.
 
Hello! I apologize posting here twice in a day (shout put to @Furry Guy for helping me out). I was told to add a loop so I added a loop and it worked until I ty...
[4 replies] Last: Oh sorry about that! I will do that next time :) Thank you so so so mu... (by crispy pata)
BigO functions
 
Below are some common BigO functions to analyzing the Algorithms: O(1) - constant time O(log(n)) - logarithmic time O((log(n))c) - polylogarithmic time O(...
[no replies]
by annw3y
Checking if it's letter digit or special character
 
Hey guys i need some help, i started a program which checks in file for letters, digits and special characters but it seems i have some mistake because it only ...
[2 replies] Last: you need to reset `i' for each word read (by ne555)
by mareli
How to perform these 2 actions in one for-loop?
 
Hello, I am working through 'Programming: Principles and Practice Using C++' and have found myself stuck on exercise 6 of chapter 4. The first part of the exerc...
[1 reply] : Ask the person each loop whether they want to convert from a number to... (by highwayman)
comparison between signed and unsigned integer
 
Hi, I am running a very small program and I am getting the warning "comparison between signed and unsigned integer expressions". Everything I read just says you...
[5 replies] Last: @Ganado, thanks for sharing that paper. I've been looking for a good ... (by mbozzi)
How do I insert into vector<int>?
 
Hi community lm trying to insert an element in a specific position then displace all elements in a vector<>. l found there's a method wich l cannot understand h...
[2 replies] Last: Thanks for anwer it help me very well, sir. vector.insert(it+n, 7... (by vincentthorpe)
by Horror
Help with Temperature Program
 
I need help writing a C++ program which reads temperatures from a data file called temperature.txt, stores the temperatures into an array and computes and print...
[11 replies] Last: > Now I just in to create a void function for the mean/average. ¿ever... (by ne555)
by annw3y
Counting Letters in Word
 
I am having troubles how to start creating program which counts letters in words in .txt file and print it if letter number is > 20.. Does someone know how to s...
[2 replies] Last: Just to show an example, because I don't think the tutorial shows a go... (by Ganado)
by luckyt
using vector in private class?
 
I am trying to use the vector m_Gamers declared in the private class using FindorInsert to compare strings. Is that even possible? Is there another way of using...
[4 replies] Last: That makes a log of sense! who knew it would be that simple -__- Than... (by luckyt)
Linked list
 
I am newb and naive about this topic can someone give me an example program and teach me? thankyou very much
[18 replies] Last: [quote=salem c]Youtube is filled with so much rubbish that it's not a ... (by Satan)
My program has stopped working every time I input 0
 
My program has stopped working every time I input 0 on the divisor. How do I fix this this? My output looks like this: Enter a number : 12 Enter a divisor : ...
[5 replies] Last: If you want a program that ALWAYS crashes no matter what numbers you e... (by deleted account xyzzy)
if else statement
 
Hi! I'm new to C++ and I was wondering how to get a statement using selection statements (if and else). Like, a statement that is executed in case condition is ...
[4 replies] Last: @jonnin thank you! it worked! (by crispy pata)
by cash
convert money in number to words
 
I'm having trouble of how I would make this program convert decimals into A fraction. For example: Enter the dollar amount:$23.45 twenty three and 45/100 ...
[3 replies] Last: Something quick and dirty using std::trunc on a floating point number ... (by deleted account xyzzy)
Sum of Product of subset of size upto K
 
Anyone tell me how to find sum of the product of subset of size upto K i.e. K=3; arr ={1,2,3,4,5}; for k=1 ans1= 1+2+3+4+5 for k=2 ans2= 1*(2+3+4+5)+...
[13 replies] Last: [quote=sawingboat12]Include value 2: then S(0) = 1 >> S(1) = 1 + 2 * 1... (by lastchance)
C++ program to check if the range between two numbers is divisible by another number
 
delete this
[13 replies] Last: Sounds kinky (by zapshe)
Finding 4 Numbers in a 2D array
 
Hello everyone, we have an assignment to manipulate 2D arrays and I have written everything for the code except the last part, which I am posting about. We have...
[14 replies] Last: It's not my problem, it's what the teacher assigned to us and it's a v... (by XboxOne2019)
Dynamic allocated array of objects
 
I am trying to write a simpler version of a zoo tycoon game that allows the user to buy animals. I have a class, Zoo that has it's own class, lion. Each time a ...
[7 replies] Last: I suspect that others here will disagree, but for now, I'd just make t... (by dhayden)
Unable to declare Global Variables of Struct Class
 
So, I made a structure and then tried to declare global pointers of that struct class. However, my compiler gave error (VS 2019) and didn't let me create them. ...
[2 replies] Last: I tried it again to get the error and apparently, no error is given no... (by redfury)
September 2019 Pages: 1... 8910111213
  Archived months: [aug2019] [oct2019]

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