Beginners - March 2014 (Page 44)

by bbb718
help n eed quick help on easy problem
 
need quick help how the heck do i set this up been at it for 4 hours now and nothing The main program will call a function named printmyname(), sending it ...
[5 replies] Last: Err,. That statement is not for you Peppercorn, it's for bbb718, I bel... (by LuminaChen)
Loops and Functions
 
I'm creating a small program that asks you to type in a number to display a characters Bio. It works great, however I don't want the program to end once you've...
[2 replies] Last: You have been very helpful thank you for taking the time to reply! (by superdaz83)
by enemy
How many elements has that array???
 
Hello! If U rememebr this program, array a /array z should have 3 elements each. In first function, these elements are also defined, arne't they? But, no...
[4 replies] Last: Many thanks! Clear now! (by enemy)
Any help plz !
 
http://ideone.com/MIV4h4 The grades is given out of 100 and it have to be out of 20 I faced a little problem with the percentages ?. any body know where ? ...
[3 replies] Last: The formula is: for (int i = 0; i < NUM_GRADES; ++i) total += gra... (by Stewbond)
Ilteration code C++
 
Hello. I need a simple code which would calculate me this (need to use one of theses functions: while, for, do-while ): (2*n)/(1+2+3+...+n) I have no ide...
[1 reply] : int n; std::cin >> n; double sum = 0; for (int i = 1; i <= n; ++i) ... (by MiiNiPaa)
by enemy
How to empty array in another function?
 
Hello! I generated an array in pus function. Then, I want to empty it in po fundtion. Please, how to correct mistakes? Many thanks!!! #include<iostream> us...
[12 replies] Last: Now it WORKS!!! THNANKS!!! (by enemy)
If else misbehaving.
 
I have to write a program that outputs certain sentences based on the size of a number. #include <iostream> using namespace std; int main() { double...
[4 replies] Last: There is no need to check if it is greater than 0 on line 19. If it is... (by giblit)
Pointer and Memory Questions.
 
Hello, I've wrote a simple program that uses pointers and dynamic memory to create an array with an element size the user enters. I have a couple questions abo...
[9 replies] Last: Exactly. Sorry about the roundabout explanation, it was like 7 am and... (by maeriden)
Delete file based on number [i]
 
Hi I have written a program that allow user to add in their file. But now I want to allow the user to to delete the file too. But I was not sure how could I sta...
[no replies]
Input/Output
 
It's been a while since I have been here. This is very basic, I need a way to open a file, read only one character, perform math operation, output new char in n...
[6 replies] Last: Thanks but it seems I have stumbled upon a new issue. I'm going to try... (by RealGiganitris)
by odogg
multidimensional vector
 
Hi How to create a multidimensional vector in C++, and assign all the elements to default values of zero?
[2 replies] Last: or: #include <vector> #include <iostream> int main() { std::ve... (by cire)
by stdeez
input files
 
Given this input: 5 4 1 2 45 1 3 4 2 3 16 2 4 6 3 4 8 How do I read in the 5 and store it in an int variable?
[1 reply] : int myInt; filestream >> myInt; (by Yanson)
Problem with struct member vars
 
So I thought I had a solid understanding of structs, but I'm running into some problems. I have a struct called charTraits which holds 3 int values for HP, defe...
[3 replies] Last: I see, so assigning it must be done outside the scope but modifying it... (by hinesro)
by Legato
Explain left and right associativity to me
 
Hello, when i first was trying to learn c++ i associated cout with <<, the << i envisioned going outward, so that it was printed on the screen. I did the...
[5 replies] Last: is cout and cin just used for a command prompt output/input? If you w... (by maeriden)
Bad practice with inline functions?
 
When writing inline functions when defining classes, if i have a simple "get function" that only returns something, I normally define it in one line like this: ...
[3 replies] Last: Makes sense, thank you. I don't have a professor as I am teaching myse... (by heyyouyesyouiloveyou)
Move cursor in terminal Mac OSX
 
In Windows, you can include <windows.h> to accomplish this with the SetConsoleCursorPosition() function. I am wondering if there is anything similar on Mac that...
[no replies]
merge sort problem
 
i had 2 linked lists and i want to merge them the out put is different . please help me . thanks . #include<iostream> using namespace std; struct node...
[2 replies] Last: yes it's right (by max v max2)
Deleting node in linked list
 
I've been trying to delete a node in a linked list, and cannot figure out why it's not deleting the one meant to replace it. When I tried delete (&target) to ...
[5 replies] Last: In a list, a Node contains an item. To remove an item from the list, ... (by cire)
Switch Statement Problem
 
Hey everyone, So I'm trying to write a sort of piggybank code for a school project. It's supposed to let you deposit, withdraw, and see what coins you have. M...
[3 replies] Last: Is there anything you can suggest I do about the negative values probl... (by psychoticbear)
What are allowed arithmetic Operators allowed for pointer arithmetic C++?
 
Examples please
[no replies]
March 2014 Pages: 1... 4243444546... 79
  Archived months: [feb2014] [apr2014]

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