Beginners - December 2015 (Page 22)

by Zorac
bool function to return true or false
 
Hello! I have made a simple program that checks if a file is sorted or not in terms of the numbers in it. It is just a assignment for us new to c++. The ...
[12 replies] Last: Thanks for the help, i managed to fix it. However i am trying to put m... (by Zorac)
drawing a rhombus
 
I have drawn a rhombus but i think this program is a little bit complicated. Can I have other methods to make it simple? Also, I found that there were some prob...
[1 reply] : Start with a function that prints a character N times. That way you ca... (by dhayden)
copy from one file to another
 
My problem is that both the while loops don't work. Please see comments in code below. #include <iostream> #include <fstream> #include <cstdlib> #include ...
[6 replies] Last: [quote=beefheart]I meant that the code compiles, but the loop is infin... (by Chervil)
Error: no matching function for call to memsetNincr
 
Error: no matching function for call to memsetNincr. Please help. #include <iostream> using namespace std; void memsetNincr(int, int, int); int main()...
[1 reply] : The prototype void memsetNincr( int , int, int); doesn't match the... (by coder777)
Boolean
 
Does anyone have some ideas on how to write a functionality to interpret "y" and "n" as true and false assignments using the boolean statement? I am really conf...
[4 replies] Last: @NT3 That really helped me a lot, thank you so much! (by galaxylfc)
Bubble sort string vector
 
ive been working on this for a while and I'm at the point where I'm required to bubble sort my string vector. I looked everywhere on how to do this but no luck....
[no replies]
List all linked list
 
hello, I am in the middle of finishing up this code and when i run through the list all it crashes and visual basic throws a exception, but what is happening...
[12 replies] Last: I got it haha. Just really drained from finals week and this is the la... (by Hidden Squid)
by ratfus
Modulus Operator Problem
 
Ok, I've narrowed my issue down to the "modulus," not the "for ()" loop. I'm trying to make a program to have the computer make a list of prime numbers. If I ...
[3 replies] Last: OH! it approaches infinity :P? Jokes, but thank you. Can't divide 1/0... (by ratfus)
by gspere
Change elements in an array
 
Hey guys, for class we're supposed to create a program to manipulate the elements of the array. I have this code so far but I still need four more functions. ...
[4 replies] Last: So I figured out the first two functions but am still not sure hoe to ... (by gspere)
by ratfus
The (Almost) Infinite Loop, for (){}...
 
In the following example, why does the code execute 200 times if I enter 1000? Shouldn't the for loop die, when I enter 1000 (1000>x), or does it view all vari...
[3 replies] Last: Yea, you're right, it works fine now. I must have messed something up... (by ratfus)
Runtime error need help
 
Why is my code giving run time error stack around answer is corrupted? Any idea on how to fix it? Thanks you #include<iostream> #include<fstream> #inc...
[6 replies] Last: Thanks so much. SIlly me (by chang123)
Pointers
 
Hello I want someone to explain what function would be called in each line in the following code, it a bit confusing and i would like some expert to show me wh...
[1 reply] : One very self-satisfying way to handle these sorts of problems is to m... (by closed account 48T7M4Gy)
by GonlyG
Slightly-off output in arithmetic sum
 
Everything explained in code comments. #include <iostream> using namespace std; int main() { /* first number is amount of triplet input [A B N]; A is the fir...
[2 replies] Last: double fixed it, thanks. (by GonlyG)
ifstream reading numbers wrong?
 
#include <iostream> #include <fstream> #include <string> #include <vector> int main(int argc, const char * argv ) { std::ifstream infile; infile.open...
[3 replies] Last: realized what you were trying to tell me with the links and came up wi... (by zacklucky)
by GonlyG
Unknown error in array checksum program (1,2)
 
Basically, I need to "checksum" for an array of numbers, the process explained in the comments of this code. However, I keep on getting the wrong result and I'm...
[30 replies] Last: Holy man of holy words, you solved it. I keep on forgetting that int h... (by GonlyG)
Cin pointer array (1,2)
 
I don't understand why I couldn't use cin>>*p++ It's not working. It outputs memory addresses. #include<iostream> using namespace std; int main(){ int n,*p...
[30 replies] Last: You also shouldn't assume that instructors are 100% correct all the ti... (by JayhawkZombie)
by Dintin
getline(cin, var) weird error.
 
So, using the code below I need to collect data entered by a user. The problem I'm having is that getline is being treated like a cin, on the first iteration of...
[2 replies] Last: //List Course Function void list(string clnam , string crsem , string... (by Dintin)
counting iteration of a number within an array
 
I have been trying to get this to function. I however seem to be re displaying the array rather than it given me a count of each number. so for instance the arr...
[3 replies] Last: Also it should be number_list = rand()%20+1; idk if the parenthesis a... (by alex067)
Catching errors of complex functions.
 
Greetings. I'm currently processing data stored in about 100000 files. While I've written the code which processes the data once loaded, I'm using an open so...
[6 replies] Last: Was hoping even Fatal errors could be ignored by try-catch blocks. I'... (by JoshuaSelvan)
Prinintg Binary search tree more details in description
 
When i step into my Insert method it does what it should, but once i call my preOrder function it only prints the last integer from the file. I tried using '&'...
[6 replies] Last: Wow dhayden hat is much less code...and i just got my code to work i u... (by nameishi)
December 2015 Pages: 1... 2021222324... 43
  Archived months: [nov2015] [jan2016]

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