
please wait
by sopiloteh
having cin statements added via a loop
|
Hi there is it possible to have cin statements added in as a if they were a variable for example pseudo code follows int main () aa = cin>>word ... |
Mar 11, 2020 at 8:16am
[2 replies] Last: Do the following for breakable loop: do { cin >> word; cout ... (by Zaap)
|
by ilovecats879
Sort Function Using Pointers
|
Hi, I am working on a lab assignment where we had to write a sort function that has three int pointer parameters, and inside the sort function, put the largest ... |
Mar 11, 2020 at 4:32am
[4 replies] Last: Why not just change the value the pointer is pointing to? ^^This ... (by ilovecats879)
|
by jw209
Infinite while loop when trying to read in from file
|
I am trying to read in from a file to print to the screen but ever since I added system time, the while loop just goes on for infinity. What am I doing wrong? ... |
Mar 10, 2020 at 9:32pm
[3 replies] Last: Hello jw209, I have had a chance to work on the "getChoice" function;... (by Handy Andy)
|
by LotToLearn
Multiplying Arrays of Different Sizes
|
I've reviewed the section on arrays on cplusplus.com, re-read the chapter in my textbook multiple times, and done a LOT of Googling. I still can't quite get thi... |
Mar 10, 2020 at 8:38pm
[2 replies] Last: I literally just put my palm to my face. Thank you, Salem...I think I'... (by LotToLearn)
|
by kakaducsy
Visual studio 2015 inherit #include
|
//incl.h #include <stdint.h> //test.h #ifndef TEST__ #define TEST__ int32_t value; #endif //main.cpp #include "test.h" #include "i... |
Mar 10, 2020 at 6:10pm
[5 replies] Last: Hello kakaducsy, I worked up the program with the two ".h" files on V... (by Handy Andy)
|
by LuffyD
How to check for file extention
|
hello, i need to check if a file has .txt or .dat extension. i have this code so far, but for some reason its not working, but works if i specify only one type ... |
Mar 10, 2020 at 5:53pm
[10 replies] Last: @keskiverto, Thanks. I was not thinking in that direction. Andy (by Handy Andy)
|
by jamesfarrow
Abstract class problems
|
This is an example copied from a book, I' sure I have copied it correctly. However complier complains all derived classes are abstract? Any help is greatly appr... |
Mar 10, 2020 at 3:59pm
[3 replies] Last: Thanks everyone - problem solved! (by jamesfarrow)
|
by sindhu05
Insertion Sort Recursive Function (possible to do with 2 recursive functions?)
|
Please see the following recursive code of Insertion sort (this is easily available online and I have also taken one from one such site) void insertionSortR... |
Mar 10, 2020 at 2:47pm
[2 replies] Last: > Can I do the same thing without using while loop and possibly implem... (by ne555)
|
by tomato1904
Simple random number guessing game
|
- |
Mar 10, 2020 at 1:45pm
[1 reply] : Hello tomato1904, After looking over everything this is what I would ... (by Handy Andy)
|
by sarah1993
How to store solution into vector
|
Hi everyone. I'm new to C++. Seeking for advise. I would like to ask. I got error when I want to store a solution into a vector. I don't know how can I fix the ... |
Mar 10, 2020 at 12:54pm
[2 replies] Last: Or fitnessFX. emplace_back ( fitness ); We know how many elements w... (by keskiverto)
|
by sindhu05
A variable with same in a function as that of the name of global variable
|
Please check the following code, #include <iostream> using namespace std; struct temp { int a; }s; void change(struct temp); int main() { ... |
Mar 10, 2020 at 9:13am
[1 reply] : Why does the compiler use the "s" of function (local variable) and no... (by Repeater)
|
by Depressed
Advice to modify function so it can read empty string as a palindrome
|
I would like to have some advice on how I can make my palindrome function read an empty c string like char blank = ""; as a palindrome bool isPalindrome(... |
Mar 10, 2020 at 7:18am
[4 replies] Last: I added return true; and it worked as expected thanks ! (by Depressed)
|
by eurolys
Need help with craps game
|
I need to make a craps game for my programming class but there are a few issues when I try to execute it. 1. How do I calculate the win percentage? 2. When ... |
Mar 10, 2020 at 5:12am
[2 replies] Last: How do I calculate the win percentage? https://sciencing.com/calcula... (by deleted account xyzzy)
|
Error declaring array |
I'm getting a compiler error when trying to initialize this array. It says I'm not able to use the variable as a constant. I'm not sure how to resolve this. Any... |
Mar 10, 2020 at 5:08am
[2 replies] Last: #include <iostream> #include <vector> int main() { // get a size ... (by deleted account xyzzy)
|
by confundido
C++ - BST Operations, Copy Only Even Nodes
|
I'm trying to modify my code to copy a BST to only copy even data. I'm having some problems with trying to manage recursive calls... Here's my function for... |
Mar 10, 2020 at 12:46am
[1 reply] : It segfaults since you access copyNode and root even when they are NUL... (by dutch)
|
by Depressed
Advice on creating a toupper function for c string
|
For a program I am writing I am restricted from using the toupper from #include<string> and am required to write my own toupper function as void toUpper(char* s... |
Mar 9, 2020 at 11:51pm
[9 replies] Last: Gotcha! Thanks for the help (by Depressed)
|
A simple cout after while function |
Mar 9, 2020 at 8:32pm
[5 replies] Last: wow, my tutor didn't even catch that. Thank you for your help! (by JuiceStain1123)
|
Write a function integerPower(base, exponent) that returns the value of baseexponent |
a |
Mar 9, 2020 at 7:47pm
[2 replies] Last: ooo, I havent had a chance to post this monster in a while! inline ... (by jonnin)
|
by zavkk
Hide requested information
|
I want to hide what I request with one cin, for example I want to write a password and instead of show the characters i am using i want to show *. How can I do ... |
Mar 9, 2020 at 5:36pm
[3 replies] Last: Your code works once I use '\r' instead of '\n' Good point. In "raw ... (by dutch)
|
(String, …etc.) / integer, …etc.) |
What would be the output of the program in case you do insert a text (String, …etc.) value instead of the numeric (integer, …etc.) values expected? And why ... |
Mar 9, 2020 at 5:18pm
[2 replies] Last: #include <iostream> #include <limits> using namespace std; constexp... (by dutch)
|