Beginners - April 2017 (Page 22)

Using Arrays and Opening files
I am creating an address book that can hold 50 entries. I'm not sure how to modify my exiting program to include an array. Any suggestions would be greatly appr...
Apr 12, 2017 at 1:10pm
[2 replies] Last: entryType is declared in my header file. I'm just confused on what ... (by tayloras96)
by CredC
dynamic array: sum of first and last number
hey everyone I am currently working on a homeworking that requires using dynamic arrays. it is supposed to take in numbers and stops when it reads a negative on...
Apr 12, 2017 at 9:50am
[5 replies] Last: ah I forgot this detail, thanks (by CredC)
by tNK
String checker problem
For some reason my program will only work if the string to check inputed first. #include "stdafx.h" #include <iostream> #include <string> using na...
Apr 12, 2017 at 9:50am
[5 replies] Last: [quote=skindig123]Using, say a std::set container, you can reduce the ... (by boost lexical cast)
Randomly fill 2D array with numbers
Hey guys, I'm trying to make a function that fills a 2D array of 3 rows and 3 cols with random numbers from 1 - 9. I thought I had the right idea however whe...
Apr 12, 2017 at 7:53am
[2 replies] Last: @schmiischmoo, Change your lines 11 and 12 from int row = rand() ... (by lastchance)
Need help on finding the longest run??
I am writing a program for an assignment, which is: Write a program that creates an int array of 20 elements, would ask the user how many tosses are required(1-...
Apr 12, 2017 at 5:24am
[11 replies] Last: Thank you for your help, this is becoming more clear now! (by thhs345)
How do I change a repeating if statement to something more efficient.
I have a minesweeper game and If there is already a mine in the location, I need to find another spot. I am using tons of if else statements. If I want to make ...
Apr 12, 2017 at 3:28am
[3 replies] Last: > simulate "draw without replacement" Here, it would be something lik... (by JLBorges)
using for each loops - Bugs!
When I create a simple array like this inside main or a function int array = {1, 2, 3, 4, 5}; everything is fine. However, when I create a pointer to an und...
Apr 12, 2017 at 2:37am
[3 replies] Last: #include <iostream> struct A { std::size_t sz = 5 ; int* ptr... (by JLBorges)
Entering many numbers into a loop
For this i have to first specify how many numbers i am going to enter. Then i have to enter how many numbers i said. For ex: i say i will enter 4 numbers then...
Apr 12, 2017 at 2:36am
[1 reply] : I'm not exactly sure what your asking, but I believe the answer to you... (by joe864864)
The range of numbers
Say i enter numbers: 4,6,2, 23 and 9 The number range is from 2 to 23 but how would i make this come to fruition in c++
Apr 12, 2017 at 2:02am
[2 replies] Last: a. determine the smallest number: say min_value b. determine the lar... (by JLBorges)
"Error: base does not name a type"
So I am wondering why I have obtained the error that says "does not name a type." What does this mean? Build errors: ||=== Build: Debug in cpptest (compiler:...
Apr 12, 2017 at 1:06am
[6 replies] Last: :) Pretty sure that's illegal. In the class declaration, you cannot i... (by skindig123)
by ETN
Does anyone tutor for free?
Hi, I am a college student taking C++ classes. I have some problems writing functions such as insert_head, insert_before, insert_after, where_this_goes, sorted_...
Apr 12, 2017 at 12:15am
[5 replies] Last: Node* _insert_head(Node* head_ptr, int number) { Node* temp_ptr =... (by cire)
C++ A few array questions/problems
Hey everyone, I have a few problems with my code. I am first year university student and this is one of my assingments. I must create a mini 'system' that ...
Apr 11, 2017 at 10:13pm
[6 replies] Last: Let me see if I understand you correctly. I should write down a 'c' ... (by integralfx)
Please I need help very badly!!!
I need help with my programming homework I been having problems with for loops with arrays can someone give me examples the details are located in the class...
Apr 11, 2017 at 8:21pm
[3 replies] Last: Hello JulianV304, PLEASE ALWAYS USE CODE TAGS (the <> formatting butt... (by Handy Andy)
Arithmetic Operations
I am having issues figuring out where to start in an assignment I was given. I'm currently taking Programming I for C++ and my professor can be very hard to und...
Apr 11, 2017 at 7:57pm
[7 replies] Last: Don't forget that a function which takes the operator and operand as p... (by closed account 48T7M4Gy)
Need help with search/sorting function in Unix
I am completing a practice problem which requests that, using a given txt file, I write a code in unix that gives me a persons information when the user inputs ...
Apr 11, 2017 at 7:33pm
[11 replies] Last: It looks a great improvement to me, @Thomas1965. Before writing my ver... (by Enoizat)
Need it to be a bool instead of Void.
I have a minesweeper program. What is happening is that there is a 5x5 array of * like so, ***** ***** ***** ***** ***** And it is using the loop to assig...
Apr 11, 2017 at 7:24pm
[5 replies] Last: Your instructions are alluding to a function that attempts successfull... (by AbstractionAnon)
by Pampam
Delete array
Hello, the problem is that i do not know how to delete multi-dimensional array. I tried smth like written below but it gives debug error. CRT detected that t...
Apr 11, 2017 at 7:08pm
[1 reply] : [code firstline=17] int** arr = new int* ; for (int i = 0; i <= raw; ... (by cire)
i/o operator overloading reading a file [help needed]
I have a txt file that has information about Movies that I need to save to a database. The text file has things like a string for the title of a movie, an int f...
Apr 11, 2017 at 6:15pm
[2 replies] Last: Thankyou Thomas, this has helped a little bit! I knew the 'm.title' wa... (by relephant)
by Jopma
Loops and File Structures Help
I'm stuck on a couple parts of this including saving all of the information to the output file and how to determine the winner. Any help is appreciated Ther...
Apr 11, 2017 at 3:08pm
[2 replies] Last: Hello Jopma, PLEASE ALWAYS USE CODE TAGS (the <> formatting button) w... (by Handy Andy)
STL List
user inputs a string i want to load the string in to my nodes of my List #include <iostream> #include <string> #include <list> using namespace std...
Apr 11, 2017 at 2:47pm
[4 replies] Last: @gunnerfunner, thanks, you were right. Corrected now (by Thomas1965)
April 2017 Pages: 1... 2021222324... 34
  Archived months: [mar2017] [may2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.