Beginners - April 2013 (Page 56)

object with constant int/float
 
I'm using a structure for several objects but I need a float within it to be constant for just one object. (the velocity of the sun in a solar system simulation...
[13 replies] Last: [quote=Computergeek01]I find this part to be interesting because it is... (by Chervil)
by jsoden
String comparison
 
I know that you can use the compare.string function to compare two strings. I also know through my own playing around that you can compare two strings using th...
[3 replies] Last: I've been using == to check if user input is the same as predefined st... (by jsoden)
by Alauda
Get max value
 
Hi, I have a line in my code which calculates the sum of all a's: a_total += a I would like to adapt the line such that I obtain the maximum, instead of the ...
[7 replies] Last: Hi everyone, Sorry for the silence, I got distracted. Yes, Vlad, your... (by Alauda)
Functions in Header File teacher barely went over it
 
#include <iostream> #include <string> #include <sstream> using namespace std; void sampleVoidFunction(int n){ cout << "You called the sampleVoidFuncti...
[6 replies] Last: never mind i got it to work thanks i appreciate the help (by jwest2468)
File editing problem
 
I am trying to edit a file called "weaponlevels.txt". It stores data in the format weapon - weaponlevel I want to let the user enter a weapon and the...
[5 replies] Last: sed, like many GNU tools, is available for Windows. http://gnuwin32.so... (by keskiverto)
Finding RMS value of arrays.
 
Hi, I'm very new to C++ and can't seem to work out why this piece of code wont work as i expected. I have three arrays representing wave functions and i am tr...
[7 replies] Last: Thanks for your useful hints. (by EagleScreams)
by Varius
Coloring Characters
 
I have been coloring text using SetConsoleTextAttribute but so far I can only color entire lines or the screen at once. Is there any way to color individual cha...
[1 reply] : Output strings character by character setting new color. (by vlad from moscow)
index problem
 
void addStore( Inventory *&inven , int &index ){ string itemName = ""; string modelName = ""; double price = 0.00; int invenQuan = 0; int...
[4 replies] Last: use vector for this: http://cplusplus.com/reference/vector/vector/?kw... (by coder777)
complexity Big O notation
 
for my this permutation function and using a loop //Permutation recursive function void string_permutation( string& orig, string& perm ,ofstream &outFile){...
[16 replies] Last: read concrete maths by D Knuth, if you really want to understand. (by writetonsharma)
output numbers in ascending order?
 
How can I get input numbers to correctly arrange themselves in ascending order no matter what? example. 1, 2, 3, 4, 5, 6 in my output #include <iostream> ...
[2 replies] Last: You want to output all numbers from two foies in ascending order? Like... (by MiiNiPaa)
fread
 
fin.read((char*)&amt,sizeof(amt) What does this line do? (char*)&amt used for?Where can I study about this?
[5 replies] Last: It means to read n bytes into amt , where n == sizeof(amt) . Also,... (by Catfish3)
Looking for exercises with my tutorials
 
I am very new to programming, the extent of my experience is editing some code/scripts (so no programming experience). I'm currently learning by watching the...
[3 replies] Last: http://programming.msjc.edu/cpp/Home.aspx Good for beginners. (by xanthian23)
c++ learning 4 kids! neeed help!
 
I am learning c++ and I am only ten years old. I read "Basics of a program" from this website and also "Variables" from this website. I am using a website calle...
[3 replies] Last: This is a college course level one C++ online programing class that th... (by xanthian23)
OpenGL tutorial?
 
Can anybody head me off to a good tutorial for somebody learning OpenGL? Preferably a 2D RPG or whatever you think is best for learning?
[2 replies] Last: http://lazyfoo.net/tutorials/OpenGL/index.php (by Fransje)
Help with arrays and input.
 
I'm a c++ beginner and I need to know how can I create an array like example ;, in which x is a number typed by the user (cin>>x;). Is there any way I can do...
[18 replies] Last: [quote=Matri X] under the subtopic Variable Length Arrays. You'll not... (by cire)
Linked Lists Help.
 
I am trying to have a print function and there is just something I am not getting with my client code. It seems all my other files are fine. Frankly I have been...
[6 replies] Last: Yeah that was the problem thanks guys. Just sometimes these programs l... (by OLittleO)
by MaxG
Need Help - Factorial Function
 
Hello, I'm in my first year of computer science and need some help in C++. The question is: Write a program consisting of two functions (plus main). The f...
[2 replies] Last: Don't be confused by the wording of the requirement. You are simply ca... (by Smac89)
by tony47
need help with modeling a dog~please help
 
hi everyone, I'm a noob in c++, here I have a project to finish, which is a model of a dog. I want to visualize it and I can give it some function to do differe...
[9 replies] Last: www.sfml-dev.org The website has good tutorials. (by pogrady)
Help me with this C++ problem please!!
 
A well-regarded manufacturer of widgets has been losing 4% of its sales each year. The company's annual profit is 10% of sales. This year, the company had %10 m...
[1 reply] : double expected(10000000); for(int i = 0; i < 10; ++i) { double p... (by MiiNiPaa)
Need help please
 
I have to write a program that displays the number of days in each month. Here's what the output should look like: "January has 31 days." "February has 28 d...
[6 replies] Last: You are very welcome. Keep up the.good work. (by Angelus1609)
April 2013 Pages: 1... 5455565758... 83
  Archived months: [mar2013] [may2013]

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