General C++ Programming - April 2012 (Page 20)

by mowali
Help! Numerical Methods Programming!!
 
Can someone please tell me what's wrong with my code? And how to fix it? Also I am trying to print out a corre.lation coefficie.nt but it's not working out with...
[1 reply] : if you want help be more specific. This for (int j=0;j<n;j++) ... (by coder777)
Global variable not updating
 
Hello! I am trying to find out why my global variables (textureBank, textureFree, numTextures) are not being updated from the texture object's constructor metho...
[1 reply] : Is textureBank, textureFree and numTextures only used inside texture.c... (by Peter87)
Matrix Generating - i don't get it
 
Hey guys I'm trying to generate a Matrix with random numbers between 0 and 1, but i'm not getting anywhere... this is what i got: #include <iostream> #includ...
[5 replies] Last: thanks a lot, works like a charm (by MountainGravity)
by NYK
INF
 
I wrote a program that keeps on sitting out INF as the product, but it is not the right INF. go figure. but it only changes the random number once every second....
[1 reply] : INF is infinity or INF file? funny isn't it? how about you elaborate m... (by TheDestroyer)
Random number generator
 
I need to generate binary random numbers. But whatever i do the code seems to generate the same random number for every execution. I need the code to generate d...
[2 replies] Last: Thanks a lot. That solved the problem (by nilagayu)
sample values as short vs float or double
 
I'm a beginner to DSP, and so far have been reading sample values from audio files with libsndfile using sf_readf_short, and have calibrated my program to inter...
[no replies]
by Qqite
Undeclared identifier of an vector< user_class > across files
 
Hello, this will make my first post on the cplusplus forums :D I have (hopefully) simple questions: Can I declare an extern variable in the header of the ...
[1 reply] : > Can I declare an extern variable in the header of the file that the ... (by JLBorges)
koolaidman project
 
okay I am making a game called Kool Aid Man and was wondering if anyone could lend me a hand figuring a few things out It would be very appreciated. I need help...
[no replies]
code bugs out? wherE?
 
the following code creates a pyramid with * and "spaces" then ads an 'o' object that descents depending on the result of a random generated number divided by 2,...
[6 replies] Last: this codes cleared the object falling in a straight line but now it ju... (by balanis)
by Yezman
1 year of college programing... summer project/topic?
 
So I just finished my first year of college programming. I was wondering if anyone here has suggestions or advice for me about a summer project. For an estimat...
[2 replies] Last: There's also the Google Summer of Code projects. (by Duthomhas)
Factors and Prime Numbers
 
This problem asks me to find the factors of a user inputted number and then to find out if it is prime from how many factors are outputted but i can't figure ou...
[3 replies] Last: It's faster if you test only up to the square root, while simultaneous... (by creekist)
Virtual Machine
 
So after learning about Notch's new game, I decided it might be fun to try to program a very simplistic virtual machine myself. I just wanted to ask some genera...
[no replies]
by idks16
minimum and maximum in a file
 
Hi I have to find the minimum and maximum number from the input file and output it on another file. #include<fstream> #include<cstdlib> #include<iostream> ...
[1 reply] : That second while loop wasn't doing anything because the first while l... (by IceThatJaw)
c++ programming
 
These are the errors: main.cpp: Line 67: expected primary-expression before "int" expected ';' before int Line 87: expected ';' at end of input
[3 replies] Last: book.h: #ifndef _BOOK_H_ #define _BOOK_H_ class Book { public:... (by Stephanie I)
modifyByValue vs modifyByReference (1,2)
 
What the difference between these two, with some examples in support. Thank you
[36 replies] Last: Here is the model of what I'm talking about: class List { public: ...... (by Napster12)
by idks16
file reading
 
i have a file that has 1000 numbers in a list form, how would i tell the program to put 10 numbers in a row \n 10 numbers in a row \n 10 numbers in a row.... an...
[4 replies] Last: i got it: #include<fstream> #include<cstdlib> #include<iostream> usin... (by idks16)
How to add classes to this game?
 
I was messing around with a simple Rock Paper Scissor game, I have came to a problem, my game simply has no classes, as it works without classes I don't see the...
[6 replies] Last: Even though in practice this isn't the prime example of when to use cl... (by clanmjc)
STL map, multimap, and set
 
What do the map and set classes in the STL do? What do they have in common and how are they different? I came across the multimap class also and was wonderin...
[2 replies] Last: Thank you so much (by hopesfall)
c++
 
I hAve asked this question for several days. I am struggling with this program. There is a input file which is of .txt. It contains list of about fifty books in...
[5 replies] Last: but i changed the program (by Stephanie I)
When should i initialize an array?
 
for example I had a program where i copied an array to another array through looping..I couldn't get correct results until I initialized the second array like t...
[1 reply] : If you will overwrite the contents anyway then there is no reason to e... (by LB)
April 2012 Pages: 1... 1819202122... 49
  Archived months: [mar2012] [may2012]

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