Beginners - April 2012 (Page 23)

not able to work with files
 
#include<iostream> #include<fstream> using namespace std; int main() { int a,b,c; ofstream outfile; outfile.open("numbers.txt"); cout<<"please ente...
[1 reply] : You need to place the data in the file. This is achieved with the foll... (by closed account zb0S216C)
fast random number generator
 
After a google search, it seems like this question has been asked to death, yet no clear answer was given; instead, lots of people dodged the question by saying...
[2 replies] Last: The seed value doesn't affect the time it takes to generate random num... (by Peter87)
while and do while wont run on CodeBlocks
 
i was trying to get this program to work but im not sure why , it might be an error on the libray or something any ideas?javascript:PostPreview()
[1 reply] : Try javascript::PostPreview() . (by Peter87)
total counter
 
I'm working with a simple do, if, else, while loop. At the end I'm trying to include a total amount counter for all of the sales in a category. I know how to do...
[no replies]
saving web page source code
 
Hi, I need your help in saving the source code of a web page as a text file. What functions should I use.
[no replies]
LNK2019
 
My error: 1>Grades9-13.obj : error LNK2019: unresolved external symbol "void __cdecl fnReadNamesAndScores(class std::basic_ifstream<char,struct std::char_tra...
[1 reply] : The prototype void fnReadNamesAndScores(std::ifstream&, std::string*... (by coder777)
floating point exception
 
Hi guys, Does anybody know when do u get the FLOATING POINT EXCEPTION? I tried searching it google but the explanation that I get aint understable. I am new...
[3 replies] Last: yes indeed, i had divided by zero in some place xD thx for comments! (by unstoppy)
std::map errors
 
Since whole error cant really fit into one post (20000+ characters), I used pastebin: http://pastebin.com/JW7AAaCx I think this code causes it: I got std::ma...
[2 replies] Last: Thanks! (by closed account 10oTURfi)
Make file not working for boost
 
Hi , i am using the following structure for make file OBJECTS := time.o PROGRAM := time CPPFLAGS += -Iusr/include/boost_1_49_0 -Lusr/include/boost_1_49_0/s...
[no replies]
Reading spaces
 
I have this loop but i want it to rest everytime it gets to a space the output is at the end #include <iostream> // libraries #include <string> using nam...
[no replies]
Cos function
 
float angle; float aimDistance = 100; AimPositionX = cosf(angle) * aimDistance My angle vary from 1 to 89 Why does cosf(angle) or any cos function s...
[3 replies] Last: It certainly should not be negative. Do this: std::cout << "cos(theta... (by hamsterman)
Inheritance question
 
I was wondering what the difference is between simply using "include" and inheritance. For example, from I have read, one could do this, class foo : publi...
[1 reply] : Public inheritance models the "IS-A" relationship of object-oriented d... (by Cubbi)
Losing data from a dynamic 2D array that is being passed in a loop
 
Hi there!! I'm writing this code for QR decomposition (code bellow). My problem is that I calculate a matrix AM and which is the minor of my matrix QA. This ...
[no replies]
by Msung
error: cannot convert 'CPacket' to 'CPacket*'
 
Hi, I've just joined the forum because I've found the tutorials on this website really useful and I've kinda come into a problem with a program I've made in C++...
[5 replies] Last: Yes! That's made it work! Thank you so much for the help! I can't be... (by Msung)
Program help
 
Hey if anyone could help that would be awesome. Its almost done but I keep getting this warning "C4715 ' Time::operator<' :not all control paths return a valu...
[2 replies] Last: Simple, you're code operator < code doesn't have a return statement fo... (by Vlykarye)
Question about not allowing a character
 
Greetings..i,m relatively new to programming and am working on a project for class...i am trying to nail down a statement i can input in my program to disallow ...
[no replies]
Converting from python to C++ help
 
So for my final you have to make a class with various card methods, but I have already made the program last semester but in Python. So I'm just going to rewrit...
[10 replies] Last: Something like this: int input_int( int minv, int maxv ) { while(... (by JLBorges)
Getting started with array project
 
Hey guys, I'm extremely new to programming and always seem to need a little understanding to how to start my projects then I do well from there. My teacher ...
[4 replies] Last: [quote=IWishIKnew]it would be easier to use arrays... Just saying. it ... (by ui uiho)
Looping
 
I need help with the loop Im trying to only read the numbers in a string. By the brute-force way would like check character by character for example a43, 435...
[1 reply] : //code tags #include <iostream> // libraries #include <iomanip> #incl... (by ui uiho)
some file help
 
hey i wanted to ask how can i calculate how many characters there is in the first word of a sentence, which is read from a file something like: while(word !=...
[1 reply] : while(!isspace(word[i++])) i is the length of the 1st word; remembe... (by ui uiho)
April 2012 Pages: 1... 2122232425... 66
  Archived months: [mar2012] [may2012]

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