Beginners - April 2011 (Page 4)

Still a little bad with pointers but i think i need them here.
 
okay so my code looks something like this: class a{ std::vector<entity> b(); public: void getentities(int i); }; void a::getentities(int i){ return en...
[2 replies] Last: Hi chr15chr15, from what I can tell from your code, I think you want ... (by dangrr888)
creating files
 
FYI - i just started coding a few days ago so dont think im really stupid or something. I am wondering if it is possible to create a file such as a .txt file...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ Simple example: ... (by SimpleIce)
Converting from XML to PDF
 
Hello Programmers..... Please Help.... I am new in C++ and I am Investigating on how to Convert Programmatically from XML to PDF in C++ or VC++... If you h...
[no replies]
*char[size] and new char[size]
 
Hi, what is the difference between char *c ; and char *c = new char ;
[3 replies] Last: Thanks Abramus, for answer.. my doubt is solved.. (by bally28)
by kalas
Question about how to pass a 2d array in to a function
 
hi i was wondering how would i pass a 2d array in to a function like bubble sort. when i pass it in as a normal array it works fine as you would see my comment ...
[2 replies] Last: see if this helps: void afunc(char arr ) { std::cout << arr << s... (by writetonsharma)
by nooby
where can i find....
 
im looking for a example how to copy sdtout to txt,can annyone help me by showing a example...thanks...
[6 replies] Last: to write to a file, you need to open a file with fopen, write to the ... (by writetonsharma)
vector< std::string > iterator
 
I'm only now just teaching myself about vectors. I've played around with std::vector< int > and noticed that the std::vector< int >::iterator I created was...
[15 replies] Last: What's idiom? idiom=terminology or wording;) (by coder777)
question regarding polymorphism
 
Hi, I'm having an issue trying to use the print() method of a subclass that is declared in the manner Creature& cr = grid.get(i, j); where grid.get(i, j) r...
[2 replies] Last: They are identical. I've narrowed the problem down further. The grid s... (by agvogel)
by Earows
Help
 
Well I'm trying to create this one game for my school project but it is supposed to be a "magic" trick a but it will defeat the purpose if you can see the numbe...
[5 replies] Last: Either: cin.get(c); or c = cin.get(); Note that doing it this wa... (by firedraco)
Help with poker function
 
Hey guys, I have spent days scanning through forums and other sites. I can't seem to find the the answer to my issue. It is for that Deitel textbook poker pr...
[1 reply] : If I was doing this, I would actually just generate a list of all poss... (by firedraco)
Help with functions and classes
 
I can't compile my program. I know it is because I am not declaring my functions and passing my variables correctly with in the class. I'm getting two errors ...
[1 reply] : Check your function declarations: void displayExchange(char& ch, doubl... (by techie07)
by CStu
Adding onto a .txt file
 
So I have to make a program where I give some math questions and the user answers them. The user's answers are stored into an empty .txt file and if they are co...
[1 reply] : refer here: http://www.cplusplus.com/doc/tutorial/files/ the easiest ... (by matsom)
Loop issue (I think)
 
I am brand new to C++ and am trying to make a tic tac toe game. I have run into a problem. Whenever I play the game, the loop starting on line 28 doesn't loop...
[2 replies] Last: That's the problem. After player 2's turn, it ends the loop. (by Dork270)
by pcworx
Review my code of pointer math!
 
Hello everyone, 1st time posting. This is not homework first of all. I am 38, hurt from a car wreck and haven't worked in several years, been in the hardwa...
[2 replies] Last: You should use curly braces in your control statements. I know they ar... (by h3432)
Accessing data within a class
 
Definitely struggling with C++ and could use some help with my assignment. I'm not looking for someone to do it. Just clarification on what needs to be done. ...
[2 replies] Last: Thanks. This helped a lot. (by sselasky1)
by Earows
Can't find the problem.
 
I just started a wekk ago and thought of making a something small to see what i knew. So i ccreated this and thought it would work but as soon as soon as i inpu...
[2 replies] Last: Thanks that helped. (by Earows)
odd error
 
Hi everyone. I keep having an odd LNK1104 error. the exact message is: error LNK1104: cannot open file ' /MyApp.exe' Which is weird because MyApp.exe is in ...
[2 replies] Last: If you're running Process Explorer, the file will still be in use if y... (by closed account 3hM2Nwbp)
problem with constructors
 
Hello! I am new in c++ and i want some help. I want to learn how to make a constructor with object arguments. I give my source code and I want to tell me if I a...
[5 replies] Last: Your main still isn't returning an int. Anyway, yeah that will work. ... (by firedraco)
Binary tree array scans
 
so i have to make a program that scans though an array returning it in the proper sequence of Left Node right, It doesn't have to be in a certain order, it just...
[1 reply] : here is the new function im working with but it is giving me a seg fau... (by sorthon123)
by gvl
sizeof(3.14)
 
#include <iostream.h> #include <conio.h> int main() { float pi__float_ver = 3.14; double pi__double_ver = 3.14; cout << sizeof (pi__float_ver) << "...
[9 replies] Last: Why shouldn't it be? float with its 32 bits is horribly inaccurate and... (by Athar)
April 2011 Pages: 123456... 55
  Archived months: [mar2011] [may2011]

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