General C++ Programming - May 2013 (Page 29)

Adding the results of an incremented value
 
The point of this program is to calculate how many cents the user would have after a certain number of days. The user is given .01 cent on day one, and this amo...
[9 replies] Last: You're welcome! (by Rehan FASTian)
Vecotr Manipulation
 
I have a vector of 57 items from an inventory for a grocery store. I ask the user to input a number (int a) of items they wish to buy (5-10) and I need to rando...
[no replies]
Classes, STL
 
Questions about Classes and STL.
[7 replies] Last: Comment on a completely unrelated subject that derails the thread perm... (by LB)
program not counting properly
 
Someone please help me fix this!! I would greatly appreciate it. I tested my count funtion. So my count function is not working properly, it should return 5 bec...
[9 replies] Last: Yes, I have string w in struct. (by Stephaniei492)
by yollo
need help to save a matrix and be able to reopen it
 
Hello :) I have this simple code: #include<stdio.h> int main(void) { int mat ,i,j; printf("Enter your matrix\n"); for(i=0;i<4;i++) for(j=0;...
[2 replies] Last: well yes Chris, I'v tried, but I just don't know how to save the actua... (by yollo)
Keeping track of numbers inside an array
 
okay well this program basically infiles grades and then find the highest, lowest and average. Then it's supposed to find how many grades are within the 50-59, ...
[4 replies] Last: Thank you so much! This definitely helped and I finally got it to work... (by Adrianooo14)
One loop in the link list is having some logical problem
 
At line 148: for (p = head; (strcmp(p->color,color)) != 0 && (p!=NULL); p = p->link); My program crashes First time pen is inserted. Second Time this loop ...
[no replies]
by ostar2
Creating a new directory
 
How do you create a new directory in C++? I would like to do this using the standard library and no external, third party or non standard libraries/headers. I n...
[7 replies] Last: ASIDE Personally I would not bother with trying to track down dirent.... (by andywestken)
Difference between char r[] = "red"; and char *q = "Quit";
 
#include <iostream> using namespace std; int main(){ char r = "red"; char *q = "Quit"; if (r<q) cout << r << endl << q << endl; return 0; } ...
[9 replies] Last: If you declare a local array variable it will always be allocated on t... (by andywestken)
Incomplete code that I am attempting to fix
 
I'm having a hard time writing the body of the bolded functions. Any help would be great. #include <iostream> #include <ctime> using namespace std; bool f...
[3 replies] Last: findIt looks good to me given the way it is called. In randomizeIt... (by cire)
by anpep
Weird error during linkage
 
Hello, world! I'm writing an C kernel and I just implemented the fantabulous printf() function. But here comes the weird trouble... bin/i386/obj/main.o: I...
[no replies]
Need help with do-while/validation
 
I am having problems at the end of the program with the do-while loop to restart the program and the validation. Can someone help guide me through this? sorry i...
[3 replies] Last: #include <iostream> #include <string> #include <iomanip> #include <cs... (by Chriscpp)
by tulips
Need help
 
Can someone help me with a c++ program that reads in a sequence of binary digits (values 0 and 1) and stores them into a STL container. The input should termina...
[6 replies] Last: Croco and Bourngond- thanks for the reply. i did run the program but ... (by tulips)
by FWZ
prime number generator
 
i wrote a progam that generates prime numbers up to a certrain number with certain amount of iterations,the code is included below #include <iostream.h> int ma...
[6 replies] Last: whats the purpose of the num variable? im a bit confused with its purp... (by Irishfitz)
Books - Perspective Projection
 
I am working on a very simple program to display and manipulate 3d objects in a virtual 3d environment. The problems I am having are around pinhole cameras a...
[no replies]
Where is it going wrong: Next Permutation Logical Error
 
I wrote this code to solve a problem in which the user inputs a permutation of size 'N' and the next permutation of the same elements has to be generated. I w...
[2 replies] Last: #include <iostream> // correction. int main() // correction { ... (by cire)
VGA emulation, text mode not working?
 
I've made a script to emulate a VGA (rendered line-by-line, Port&Memory I/O handled by functions), but for some reason I won't get any text output? (Graphics se...
[no replies]
Close to breakthough
 
I can't get the bubblesort template function to work. Header #ifndef _MYFLOAT_H #define _MYFLOAT_H #include <iostream> using namespace std; template <class X...
[1 reply] : I believe it has something to do with the fact that you had declared a... (by Smac89)
Building SFML for Code::Blocks (1,2)
 
Disch has posted a wonderful explanation on how to set up SFML here: http://cplusplus.com/forum/beginner/95295/ Thing is, it's for Microsoft Visual Studio....
[23 replies] Last: This is really, really weird: C:\SFML-2.0\projects>make clean The sys... (by Vidminas)
N-Bod Simulation Program
 
Hi all, I am a first year student studying computer science and over my summer break I really want to learn more about a module which has recently fascinated...
[no replies]
May 2013 Pages: 1... 2728293031... 47
  Archived months: [apr2013] [jun2013]

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