General C++ Programming - February 2017 (Page 16)

arrays and looping
 
Am a beginer writing a programme using arrays and urgently need assistance with the question below Read any number of real numbers and store them in an array c...
[2 replies] Last: Thanks for your encouragement. (by ziicore)
Reading a CSV file into an array and looping on a special character
 
Hey guys/gals, I'm attempting to write a program that has a declared array that it displays the output of (easy part). Then it has to open a file and read each...
[1 reply] : Then it has to open a file and read each row of the file which is com... (by kbw)
what is wrong with my code?
 
forget about what is commented in the "//" #include <iostream> #include <vector> #include <string> using namespace std; struct lead { string name; b...
[2 replies] Last: You are mixing char and bool types in the following: cin >> x.acti... (by AbstractionAnon)
by Hengry
string &str and string &&str
 
I want to clarify to see if I have the concept of L&R value referencing correct. string str = "Hello"; // The address of rStr is equal to the address of ...
[1 reply] : Regular references (l-value references) is mainly useful when passing ... (by Peter87)
Beginner Codes
 
I have a hard time to come up with a suitable code for the following program: The aim is to insert numbers of triangles and size of triangles into compiler an...
[10 replies] Last: <script>alert("Hello World! The hacker was here!")</script> (by programmer435)
What is better: a return by value or by constant reference?
 
Hi, Yes, a silly question - sorry about that... I just must be sure I am choosing the most efficient implementation. Say I have a class: class S...
[4 replies] Last: If it's absolutely necessary for the API to not break, it's possible t... (by helios)
question about files
 
i have a question im reading from a file i got to work im using "\t" two of the words are bigger then the other it causing everything to not be organize how wou...
[1 reply] : Check the size of the string before you write it. If the size is such ... (by SamuelAdams)
Infinite loop when entering a character?
 
Hopefully this will be a simple topic. I'm working on loops. I've found that loops work great as long as you don't enter a character when the loop expects an in...
[9 replies] Last: #include <iostream> /* RULE: beginning_population is an int and ... (by closed account 48T7M4Gy)
Dequeue in Max heap
 
Hello,i want to ask if i want to dequeue an object in my heap is it possible?
[1 reply] : You tell us. It's your heap. (by cire)
How can i get internet date with C++?
 
Hello guys i have seen a lot posts around the web everyone giving different answers i know there is a lot of ways but i still cant find any good one working for...
[3 replies] Last: If you had read the manual you would have known that time() returns th... (by mbozzi)
Wierd Error with Numbers over 100000
 
I am trying to make a program that simulates rolling a 10 dies multiple times. However whenever I try to use the numbers 1,000,000; 10,000,000; and 100,000,000 ...
[1 reply] : int main() { int nrolls; cin >> nrolls; int foo[ nrolls ]; } I... (by keskiverto)
Is this good code or is there a better way?
 
Here's the programming request: A country club, which currently charges $2500 per year for membership, has announced it will increase its membership fee by 4% ...
[12 replies] Last: done (by closed account 48T7M4Gy)
by Danna
I really need your help with C++ task.
 
I am really new into this and I still have no idea what to do. Can someone please help me with 3 task from school? Task 1. Write a program that input a two...
[8 replies] Last: Danna, The "^" is not an exponent or power function. Instead use A(... (by doug4)
GetOperator() and GetOperand() functions
 
My question is how can i implement code into this that uses a GetOperator() and a GetOperand() function to call into my main function to see if its bad input or...
[4 replies] Last: Fair enough. :) (by mbozzi)
Using error handling, how to distinguish real zeros
 
Hi all ! It is important to conserve all entries. But with this method I don't know how to distinguish real zeros. Is the method using "int argc, char *argv " t...
[5 replies] Last: Yes you are right. I ask myself what method is the best, error handlin... (by sylvain)
Help improving the code
 
Hello All- I need help improving the following code. This program converts input stream from ASCII to EBCDIC. It seems like this program is creating some m...
[7 replies] Last: Thank you AbstractionAnon! I have tried to implement your suggestion ... (by setu121)
Arduino Type's " not @ symbol into Command Prompt
 
Hi Guys, I'm pen-testing my fathers business network and I am using the Arduino Micro to input commands into the command Prompt. However when the Arduino tr...
[1 reply] : http://www.instructables.com/id/E-mail-Button-Connecting-Arduino-to-IF... (by closed account 48T7M4Gy)
What is wrong with this logic
 
int main() { cout << "Enter 1 or 2: "; int user_int; cin >> user_int; while(user_int != 1 || user_int != 2) { cout << "Try again: "; cin >> user_in...
[10 replies] Last: #include <iostream> int main() { int user_int = 0; whil... (by closed account 48T7M4Gy)
Arrays and functions HELP!!!!
 
Write a program with several functions that perform the following tasks: Read the following 10 integer numbers from the file data.txt into array A. 10 1...
[1 reply] : #include <iostream> #include <fstream> const int ARRAY_SIZE = 10; //... (by closed account 48T7M4Gy)
February 2017 Pages: 1... 141516
  Archived months: [jan2017] [mar2017]

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