Beginners - November 2012 (Page 47)

Why Doesn't This If Else Statement Work?
 
I have this if else statement in a program to calculate three grades from multiple students. I can't figure out why this function will always assign 'P' to lett...
[12 replies] Last: You could take it out. It doesn't do anything except make sure that an... (by LB)
Program assistance please
 
Im going to ask for 3 numbers. I take those numbers as num1, num2, num3. Add those numbers and then for the row1 = (num1 + num2 + num3); cout<< |num1| num2| ...
[1 reply] : This is not a homework service. Come up with a specific question or j... (by webJose)
by alext
Float and int variabels in the same function?
 
Hi, I currently workning on a school assingment where we shall create a function that can convert both int and float numbers (celsius to fahrenheit). But I can...
[3 replies] Last: Thanx, that solved it =) (by alext)
Infinite Loop after cin help
 
Below is a code fragment that I'm having trouble with. For some reason I get an infinite loop after entering the telephone number into the struct variable that ...
[8 replies] Last: Ah yea completely overlooked that fact. Thanks again, got the program ... (by raines883)
linked list delete function
 
Hi, My delete function isn't deleting anything. I want her to delete only the node that is selected. Here is a part of the code. I'm not seeing what is wrong. ...
[1 reply] : You are using mutually exclusive conditions in the function. Neither n... (by vlad from moscow)
by vrakas
Sorting Fractions
 
Hello. I have to sort n fractions given their numerator(a1-an) and denominator(b1-bn). My question is: Is it risky to: have a struct fraction { int n...
[2 replies] Last: wow never thought of it ;p thanks! (by vrakas)
by vrakas
Map with structs
 
Can i make a make out of a struct i will make(for key AND for value) g struct cup{int capacity,price}; and then map<cup,cup> m1; i should write a comparison fu...
[2 replies] Last: thanks a lot (by vrakas)
Loop Skips User Input
 
My displayMenu function is stuck in a continuously loop (keeps outputting) after the second iteration when I call the addPlayer function(4 calls it). Any sugges...
[9 replies] Last: Lol! What's the actual use for cin.ignore()? Is it a user input format... (by drognisep)
How can I convert this function into a float?
 
#include <iostream> using namespace std; int main() int testing (int c, float d) { //if d is greater than c, return the integer part of d...
[16 replies] Last: Thank you !!! (by ny24gray)
C++ 11 Video: Static Polymorphism
 
Everyone knows how to use the Polymorphism with dynamic binding. But dynamic binding has a run-time cost of both time and memory (virtual table). This video de...
[no replies]
A loop similar to do while loop?
 
Is there any loop that can repeat a program without the user having to enter yes or no to decide whether the program loops again?
[3 replies] Last: Thanks Terje :D (by DJLad16)
Understand array instructions
 
Hello, I'm trying to work out these instructions - 1) The user is prompted to enter a positive integer, say n. 2) As long as n is between 10 and 30, the pro...
[18 replies] Last: Ok, I put it below where 'n' and 'array' get values assigned to them a... (by cheshirecat)
ifstream/ofstream troubleshooting
 
I'm attempting to create a program that reads in 5 lines of text from a text file and then outputs those lines of text, plus the number squared and cubed into a...
[2 replies] Last: Your while loop reads the entire file. After reading the last value, ... (by Chervil)
Need some understanding.
 
This was an assignment I was given in my programming lab that is meant to use 3 functions to analyze the performance of a class from an input file. The user sho...
[1 reply] : either read the file in each function: Input File: one student per ... (by Darkmaster)
by s1729
Problem with delete []
 
Hi, I am a beginner in c++ and to this forum. I am trying to write a code for defining a 3-d array and some simple operations on it. However, my code seems to ...
[11 replies] Last: [quote=Framework] The compiler-generated default constructor is called... (by cire)
[Win32API] Select Folder
 
is there struct and fucntion similiar to OPENFILENAME and GetOpenFileName just to select folder instead of a file? or how do I have to use OPENFILENAMe and GetO...
[3 replies] Last: i'm using multibyte character set, and I've been using everything wit... (by Disch)
for(string s:x) does it exist?
 
I have a program that reads txt from a file and counts how many words there are. I need to modify it to count how how many occurences of a certain word there is...
[2 replies] Last: To count how many occurences of S are in X, the C++ solution is to cal... (by Cubbi)
2D array or 2D vector
 
Hello I am writing a program to process images. The aim is first to read the image pixel values and apply some different filters. I have a image class wh...
[1 reply] : get the OpenCV libraries and use them. that's probably the easiest way... (by Darkmaster)
Palindrome using stack
 
I've made my program become more advance due to my last thread using que & stack #include<iostream> #include<string> #include<stack> #include<queue> usi...
[19 replies] Last: i did it . after i just change to for loop . i get it. because if i++... (by Felicia123)
[Win32API] BlitBitmap
 
I have this code to load TGA, convert it to bitmap and then display it in WM_PAINT message, however when I run app nothing happens: edit: also can someone tell...
[6 replies] Last: Thanks! stretchblt works fine! (by mekkatorqu)
November 2012 Pages: 1... 4546474849... 75
  Archived months: [oct2012] [dec2012]

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