Beginners - August 2017

by xbar2
Need some help with my C++ practice
 
Hi all, i am learning C++ and have some test mockup available with me while practice, i was able to solve 20+ answers but i got stuck up with some of these: ...
[1 reply] : 1, 2 and 4 appear to be trick questions. There is no built-in integer... (by JLBorges)
HELP!!
 
I am stuck with this question..hope someone could guide me along! Thank you Problems: 1. I do not know how to generate r .even,r .odd,r .sum,r .digit <- cou...
[10 replies] Last: Hello cplusplusgs, "using namespace std;" if for lazy instructors tha... (by Handy Andy)
Include other cpp files into main.
 
I am currently creating a simple login system for an upcoming assignment. I want to neatly organize everything and have decided to create 2 cpp files with a hea...
[5 replies] Last: You've made the same mistake in line 20 of your first code block - you... (by MikeyBoy)
string C++ and C-string
 
What is a string in C++ and what is the difference with C-string; What is the use of string tables in c++;
[2 replies] Last: string in c++ is a class/object with methods and internal memory manag... (by jonnin)
AUTOMATIC SHUTDOWN THE CONSOLE
 
i want the console auto shutdown after 1 minute because i dont want anyone who try fake ID and password.so how can i auto shutdown the consol after 1 minute.......
[8 replies] Last: Dev-Cpp uses the same MinGW compiler that comes with Code::Blocks 16.0... (by Thomas1965)
delete words from file
 
How do i delete words from file.Here is my code.Lines 52-67 are the lines that i need help with. #include<iostream> #include<stdlib.h> #include<fstream> #incl...
[5 replies] Last: Here's one way of thinking about it, which is fairly simple. Read the ... (by closed account 48T7M4Gy)
Can someone please help me solve this question?
 
Hello I have received this question from my lecturer, however, he is unwilling to teach me how to solve this question. This quiz is long over, however, I just w...
[7 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by lastchance)
Program does not give the right values.
 
We have to make a LCM function, the GCD function was given. I copied and pasted the GCF function to LCM function because I need the GCF and added lcd= (a*b)/c(w...
[4 replies] Last: Thanks for the help guys, I appreciate it. (by Adjutant)
searching text file
 
function Searchf accepts line but displays not found even for words that are present. #include<iostream> #include<stdlib.h> #include<fstream> #include<strin...
[2 replies] Last: thank you so much. (by closed account 1vf9z8AR)
file search even displaying part of word
 
The search works but when i type a letter or continous letters of a word it displays word found even then. #include<iostream> #include<stdlib.h> #incl...
[2 replies] Last: thanks. (by closed account 1vf9z8AR)
HashTable Remove Function crashes program (1,2)
 
I have two functions find and remove implemented for a linked list and they work fine. However I'm using the linked list to solve collisions for my hashtable an...
[21 replies] Last: My apologies. I didn't know this was a forum about which letters to ca... (by kingkush)
making a C++ program and need to input a bat code
 
Write your question here I am writing a program to assist with password resets and need to input the code from a bat file into my code to start the next step h...
[6 replies] Last: missed the follow ups. system can be replaced with, depending on what... (by jonnin)
For loop question
 
I used a simple for loop in a program ie (int i =0 ; i<x ; i++) , but now i need to use the value of i avter the incrementation for another equation and i get t...
[2 replies] Last: Telling the above in simple terms declare int i outside for loop and u... (by closed account 1vf9z8AR)
How to assign the max & Min into the array's rows (1,2)
 
Hi everyone, I got a problem assigning the maximum and minimum into the respective array's rows. I've already found the max & mini value but not sure how to ...
[23 replies] Last: Hello Shyanie, You are welcome. If you have any more questions just a... (by Handy Andy)
by xeef
sem_t for pthread on heap
 
do i understand this right if i have a class with a class variable i need to use malloc and cant do just sem_t sem; as then sem is created on the stack ...
[8 replies] Last: @coder777 This is called a dangling pointer. this is clear to me ... (by xeef)
by Ma92
reference returning functions
 
Please explain, where we can use a reference returning function. int& setdate(int t) { return t; }
[5 replies] Last: Oh, interesting example. I didn't think of that, thank you. (by Ganado)
confused on passing by reference
 
what im really trying to do is to have this program calculate the equation i have but instead of it printing out 10 its suppose to print out 20. essentially i w...
[2 replies] Last: Line 19 creates a whole new variable named x. Perhaps you meant: x... (by Repeater)
deleting an element in a class array
 
Brief Background: - I am using two classes (Patient and List) + test drive (.cpp file) - Here is a peek at my private section of List class: - Purpose of pro...
[6 replies] Last: vectors are sweet but you may want to avoid resizes and big data shift... (by jonnin)
by Bopaki
The function: replace_copy_if produces no output in my program
 
In this program the function: replace_copy works fine, but replace_copy_if gives no output. //STL Function remove, remove_if, removecopy, and remove_c...
[5 replies] Last: ( int x ) -> int { return x <= 50; }, this should technically retur... (by gunnerfunner)
Most Common Word in a Document (1,2)
 
I hope this is the right place to post this..... I am currently having to write a program that opens a file and figure out which word appears the most. It has ...
[26 replies] Last: Won't scale up well but nevertheless. #include <iostream> #include <... (by closed account 48T7M4Gy)
August 2017 Pages: 123... 17
  Archived months: [jul2017] [sep2017]

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