Beginners - February 2013 (Page 50)

Average Rainfall (1,2)
 
I need to write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. It should first ask for the number o...
[31 replies] Last: [quote=cPlusN00b]don't think you can assign a variable int to a consta... (by cire)
fmod/floor problem (double varliable returning 1 when computing fractional remainder)
 
I'm working on a function to compute the number of decimal places in a variable. It works fine some of the time, but other times it behaves unpredictably. I r...
[1 reply] : Rounding to an arbitrary precision and displaying the digits correctly... (by toum)
References Help
 
Hello, I can't figure out why this is giving me such an issue. Hopefully someone can help, I'm sure it's something simple that I'm just forgetting about refere...
[2 replies] Last: You're right I just read something similar on StackOverflow. Apparentl... (by cppnoob99)
Modulo %100
 
Hello, Pleased to have found this forum, hope to learn a lot and help wherever I can in the distant future. I have a question concerning a randomly genera...
[4 replies] Last: I'm not too sure why I need % 100 in there for it to be a number from... (by AbstractionAnon)
Downloading and Setting Up A C++ Compiler in NetBeans
 
Hello and thank you all! I really really appreciate your help. I am completely new. I'm a highschool student who is used to Java. I was attempting to conduct se...
[2 replies] Last: I really appreciate the reply! I got it to work. Thank you a lot! (by anonymousxyz)
Can't figure out what's wrong in my code?
 
The problem is: Write a program that reads in ten whole numbers and that outputs the sum of all the numbers greater than zero, the sum of all the numbers less...
[4 replies] Last: Oh, alright! Thank you so much! (by xNeverLetGo)
by Modred
Pass struct to class
 
I am trying to pass a struct to a class so the class can use the member values. I am only including an abstract because the main code will be huge. I do not wan...
[2 replies] Last: Perfect, didn't think to put the struct into a separate header. Thanks... (by Modred)
Code Dump
 
#include "palindrome.h" void CPali::input() { cout << "Word: "; cin >> word; } void CPali::check() { length = word.size()-1; for (int i = 0; i < lengt...
[2 replies] Last: You have a problem with your loop at line 22. valid is not track... (by AbstractionAnon)
Mach-O Linker Error Help
 
Hi guys. I'm having trouble trying to do an assignment for my c++ class. I have to design a program about a Peg that can hold disks on it. Each disk has to have...
[2 replies] Last: Please post the exact error message you're getting. Your code comp... (by AbstractionAnon)
by vrakas
next_permutation()
 
Hello. I want to use next permutation on an array of structs i did depending on an integer variable x. Can i do this? struct my_struct{ int x; .... }; ...
[4 replies] Last: Yes, however you need a custom comparison function to determine which ... (by AbstractionAnon)
by vrakas
Multimap question
 
hello i am studying maps and i have this question. multimaps are just maps but 2 or more elements can have the same key? why would someone use a multimap. i mea...
[1 reply] : Let us say we want to implement a phone book, with the name as the key... (by JLBorges)
Palindrome prog, removing whitespace
 
I have an assignment where i have to make a palindrome program. As you can see i have already done the basic palindrome prog, however i am now stuck since the p...
[3 replies] Last: > explain what does your for loop do, cause i don't really understand ... (by JLBorges)
Order of evaluation of this expression
 
int x, *y; x=10; y=&x; ++x = -3543 * 543 % 2 | 4 > 42 && 324 * !423 / ~31 << 3 * *y * sizeof(x); How is this expression evaluated? Please explain s...
[6 replies] Last: [quote=Smac89]//doesn't matter what we do from here, the answer is tha... (by Chervil)
Implementing a reload function
 
I am making a tank game, and I am trying to implement a reload function. What I have now is this: void Turret::shoot(double deltaTime) { if(timeSinceLast...
[1 reply] : I fixed it by looking at how I did my cooldown and implementing this: ... (by Enchant)
by Daleth
Going beyond the boundaries of a 2D array map
 
I read from a comment on this forum that advised a fellow new programmer to be sure that whatever objects move on the map do not move beyond the boundaries. Oth...
[2 replies] Last: Functions involved with manipulating the map and displaying it: //.... (by Daleth)
One error after compiling using codes:blocks compiler.
 
Hi,i have been trying to make simple graphics but i have never been succesful,another day a friend told to use OpenGL and after looking at the sample it comes w...
[no replies]
by cide
Generate a simple window..compile and download...tip for beginners.
 
I just updated the web user interface. Here is the link : http://make-software.tk
[no replies]
Help with if and else
 
I'm writing a code to categorise values and written this code: float E3, Eiii, Ec; if (E3 >= 20 && E3 < 50) {Eiii = 20; Ec = 50; } else if (E3 >= 50 && ...
[9 replies] Last: Solved it! Thanks everyone! (by MirzaAdrian)
How to fix this error ( binary search)
 
Hello all pro. I write this program by visual studio C++ 2010 #ifndef BinarySearch_H #define BinarySearch_H #define max 1000 #include <cstdlib> #include...
[2 replies] Last: Thanks for helping. Have a nice day to you! Chervil (by viet10932)
Strange fstream
 
Hello, and thank you for taking time to help me out. For starters, I already know what I was doing wrong and found out how to solve the bug I was experiencing, ...
[2 replies] Last: Ah, ok. That makes more sense. I'm afraid I don't get the "eofbit" or ... (by ParkourPenguin)
February 2013 Pages: 1... 4849505152... 67
  Archived months: [jan2013] [mar2013]

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