Beginners - September 2017 (Page 3)

Help with While Loop program
 
I have an assignment where we are told to estimate the value of e using the formula e= 1 + 1/1! + 1/2! + 1/3!... my code runs but, I can't seem to get the ri...
[2 replies] Last: The problem with your code is that you are not resetting your factoria... (by andywestken)
How to add structures instead of using classes??
 
How to add structures instead of using classes??
[8 replies] Last: OP could give us contact details of his/her academic supervisor so we ... (by closed account 48T7M4Gy)
by Clos
Getline while loop
 
Write your question here. So Im super confused and can't seem to figure this out. Im trying to figure out how to get information from a file ( which I figured ...
[3 replies] Last: > where is the extra line at the bottom coming from? This (checking f... (by JLBorges)
iterator and ostream
 
this is just an example not actual code if you were using iterator and list. You were using ostream and you wanted to cout statement how would you do that. ...
[3 replies] Last: #include <iostream> #include <list> #include <iterator> struct examp... (by JLBorges)
help me with this crazy homework
 
this is my instructions "You have been hired by a local coffee shop to implement an idea the owner is sure will become the next greatest way to order a coffee...
[5 replies] Last: Thanks I got it!! Thank you so much!! (by HotaLIsa)
Greedy Best First Search Algorithm
 
Greedy Best First Search Algorithm, how to compute the length of its traverse? I have this problem that I am working on that has to do with the greedy best...
[4 replies] Last: Oh ok, Its based of the TSP so I will follow that method. Thank you fo... (by WhatHaveIChoosen22)
Need to loop once more.
 
So this program should delete copies in an array. for example: user inputs 'KAADD' the output should be 'K'. Also if the user inputs 'ABBA" the output should...
[5 replies] Last: Your code should look like this: Most likely not. Have you heard of... (by keskiverto)
Problem with switch case
 
Whenever I try to run this code it works everytime. Thing is, it should only work 1/10 times as it's a random 1 to 10 integer. I don't think it's taking the inp...
[3 replies] Last: Oh... I just realized that. Thanks for the information. (by Anoraki)
delete file contents(modified)
 
Whole file gets deleted instead of reuqired data. File.dat is the original file with already entered data. else if(option==5) { int rno...
[no replies]
combining
 
can someone give me an example of c++ that combining array,pointer,looping,selection ,structure,function and program menu. i just wanna know is it possible
[no replies]
Help how do I stop it from print duplicated
 
When I print I don't want to print out the duplicates. As it is now, it will print Alphabet : 3 Alright : 3 Apple : 3 Alphabet : 3 Alright : 3 Apple : 3...
[3 replies] Last: Hello Barbatos, You need to answer the questions: What is a duplica... (by Handy Andy)
Displaying and looping
 
Okay, so what I am trying to do now is to get the values displayed, and loop them for each sorting technique for the ptrarray and deref functions #include <...
[5 replies] Last: @Enoizat I wasn't being critical of you, it's none of my business to ... (by closed account 48T7M4Gy)
Cant find the Pixel color
 
Good day/Good Evening to everyone here at cplusplus, It is my first time to ask question about c++, I'm currently self studying this language for about a mont...
[9 replies] Last: when i debug its goes successful but when i try to use this 1 it wont... (by Thomas1965)
System pause error
 
So, I have done a basic calculator program for college, but when you execute the calculation it prints the answer and the program closes. I have tried system("p...
[9 replies] Last: No problem. For reference information, cppreference.com is an excelle... (by MikeyBoy)
why it didnt loop like i hope?
 
i try 3 different apps but it didnt looping,it can run but it didnt loop ,is it because wrong structure ??? if it is ,any suggestion should i try ?? #include...
[14 replies] Last: All you had were the braces {}'s ... in the wrong places. A switch co... (by closed account 48T7M4Gy)
std::list and iterator
 
how do you return a value using std::list and iterator here an example include "example.h" public const example* getExample(unsigned int i) const ...
[6 replies] Last: What would you return instead of "return exampleOne include "exam... (by coder777)
by Demii
Counting correct answers from 2 arrays
 
Hi, i'm writing a program that will grade quizzes from a fixed array of correct answers, it compares this array with a text file containing student answers that...
[3 replies] Last: I would do something like sum+=arrayname Beware of mixing apples an... (by Chervil)
swapping bytes in c
 
I am trying to swap bytes in c. I am suppose to swap the nth byte and the mth byte. I am given examples such as 0x12345678, 1, 3) = 0x56341278. 1 meaning n a...
[7 replies] Last: It's not the "human readable form", it's the actual value stored in th... (by helios)
Need help with tranferring array to other array
 
I don't quite get what to do with the TO DO: parts of the code, how would I copy an array to new array and copy the address of new array to pointer as well? ...
[3 replies] Last: yes and no. yes, that is the correct syntax. No, you cannot just re-... (by jonnin)
Need help with array
 
If i have a number of numbers in the array 0) and I declare pointer 1) and I allocate dynamic memory here for my pointer 2) and I allocate dynamic array for cou...
[1 reply] : this leaks memory. the memory allocated on step 2 is inaccessible af... (by jonnin)
September 2017 Pages: 12345... 21
  Archived months: [aug2017] [oct2017]

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