Beginners - June 2009 (Page 18)

by jimctu
vector desalocation error
 
hi everyone...i´m here again... =) well, i make no idea why this error is happening... I have basically this code: vector<char*> ListParam; tem...
[2 replies] Last: !!! stuppid one here... ¬¬ I am on this problem for 2 hours and j... (by jimctu)
File I/O problem.
 
I'm looking to get numbers from a file, which has them laid out like this: 1 2 3 4 5 How can I do this? Bearing in mind the numbers will need to be ad...
[11 replies] Last: LOL, sorry. See the other thread for more. (by Duthomhas)
by GameOn
fastest method to find all divisors
 
i need to find the all the divisors of a num(int) i am applying this approach for(int i=1;i<=n/2;i++)} if(n%i==0) v.push_back(i); } here vector v will ...
[7 replies] Last: whoooa!!!! how stupid i am ^^ thanks and sorry for makink u post suc... (by GameOn)
by Bv202
Pointer to char question
 
Hi, I don't really understand this: char* testvar = "Hello, world!"; Why does this work with a pointer? A char can only contain one char?
[7 replies] Last: Actually, both syntaxes are not equivalent. The former makes a pointe... (by helios)
Preprocessor Directives
 
Can someone tell me where preprocessor directives such as #define are useful in pure C++ programming? I've run across a freaking immense number of preprocessor...
[4 replies] Last: Thank you both. It makes more sense now. I most likely will not find... (by Return 0)
by Cyanz
fighting simulator
 
i have been working on a fighting program but i have a little problem when i start up the program i cant see wich fighter is hitting who here is the code so ...
[6 replies] Last: Ali vs Gandhi ! (by Hammurabi)
by tition
How do you create/open a file (windows)
 
Hi all, A very frustrating for me beginner's question: #include <fstream> std::fstream theDump; theDump.open("C:\\VP.txt",std::fstream::in | std::fst...
[6 replies] Last: fstream is apart of std i think. std::fstream dump("c:\\VP.txt... (by jloundy)
by Bv202
Class questions
 
Hi, I've just learnt some basics of OOP questions and to split .cpp and .h files. But the longer I'm doing this, the more questions I'm starting to have. ...
[4 replies] Last: Thank you Disch, I'll read that tutorial this evening :) (by Bv202)
by Bv202
Switch structure not working
 
case 2: int roll = Random(1, 4); if (roll == 1) { cout << "You run away!" << endl; return true; } else { cout << "You could no...
[4 replies] Last: That works fine, thank you Bazzy :) (by Bv202)
by axim
Linked list experts - URGENT CALL
 
Please someone helps me with this question I must submit the answer tomorrow. The program is not working properly as is suppose to ; I am not getting the result...
[1 reply] : Your code: #include <stdio.h> #include <stdlib.h> //it would be be... (by hamsterman)
C++ and the scripts languages
 
Can C++ build .exe application to run scripts write on another programming language (like Python)? And if it can, can someone tell me some of there languages, a...
[1 reply] : Read this thread: http://www.cplusplus.com/forum/general/11061/ (by Bazzy)
Noob fstream question
 
Can someone please provide me with code of simply opening an existing file (lets say a .txt on the desktop) to edit? I've reviewed this sites (along with oth...
[4 replies] Last: oh nice :O ..handy lol (by k2sickness)
by now
Noob 'if' statement problem
 
Hey Guys. I'm not sure whats going on here. I can't get my head around it but the if loop doesn't seem to like looping more than 8 times >.< I have a simp...
[6 replies] Last: Ah, fair enough than. Thanks for clearing that up ^.^ Should be fine ... (by now)
can't seem to get the value-returning function right...
 
I haven't finished my program yet, but the errors say, "local function definitions are illegal" for my functions...I don't know what to do, does anyone have any...
[3 replies] Last: You have some newbie mistakes...read: http://www.cplusplus.com/doc/... (by firedraco)
Operator Overloading
 
I am trying to overload some operators, using objects. The program compiles fine, but crashes when run, right after getting to the overloading part. Here is the...
[6 replies] Last: Ahhhh, much better, thanks. File Name: Driver_7.cpp #include <... (by budzbox)
generating random numbers in an array
 
i'm trying to to generate random numbers in an array, up to 100 numbers, using classes and objects. so far, i have: #include <cstdlib> #include <iostream> ...
[1 reply] : Your class is named ArrayClass1 but your constructor is named Array... (by Hammurabi)
by linus9
combining numerical arrays with pointers
 
Hi there, I'm in the process of teaching myself C++ with several books including "Sams...C++ in 21 Days". In the Q&A section of Chapter (Day) 13 of the Sams ...
[2 replies] Last: Thanks so much for your help; I really appreciate it. I'll have to ... (by linus9)
using oct
 
Not that octal floating point is commonly (or ever?) used, but I was experimenting with stream manipulators and found that std::oct is ignored when outputting a...
[2 replies] Last: You can represent floating point numbers in other radices, but it is u... (by Duthomhas)
by comac
How to go to develop applications
 
I am new user here in this forum, i have not yet read every line, to end is it already users as writed aboute applications - how to go to way that develop appli...
[2 replies] Last: If you don't know, then either don't post or ask him to try to be more... (by Duthomhas)
by Timbo1
cin >>
 
I have this #include <iostream> using namespace std; int main () { char answer = 'a'; char age = 'a'; char name = 'a'; float height = '0';...
[12 replies] Last: your trying to fit a string into a pre intialized char. you need to ch... (by jloundy)
June 2009 Pages: 1... 161718
  Archived months: [may2009] [jul2009]

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