Beginners - April 2011 (Page 31)

priting my name backward
 
#include<iostream> #include<cstring> using namespace std; int main(void) { char temp ; char *name = &temp; cout<<"input something"; cin>>t...
[12 replies] Last: youre close with what you have. now that you can identify each indivi... (by ascii)
Combinations without repetition
 
Hi to all, i am new in this forum.. and i need your help. My problem is that i am making the code for all combinations without repetition but i can't solve it. ...
[8 replies] Last: Well, think of vector<vector<double>> as double , except vectors ... (by Mathhead200)
problem with argv[]
 
Hey guys, I've been trying for way too long just to get this program to print the name of a directory from the command line and the first file name. I always ju...
[8 replies] Last: no worries lol, I've started over and I've got it working better now, ... (by Garritt518)
Strings and Ifs
 
Basicaly i have a string with text like "who are you". After using cin to get a users input, i use an if statment to see if the input and a string match. when i...
[10 replies] Last: EDIT: You're comparing a char array to a string. Change talk to a stri... (by packetpirate)
best method of initializing an array
 
Hi - I'm building a class that requires a couple of arrays. They're fairly big, and their contents require a bit of calculation, so it's doubtful I can do it...
[no replies]
sorting a linked list
 
so, i was just introduced to linked lists and most of the basic operations, i have down pretty well. i'm having a little difficulty coming up with algorithms fo...
[2 replies] Last: thanks for your input. i ended up getting the second algorithm to work... (by prophetjohn)
What am I doing wrong?
 
/*Following errors*/ 1>C++ Notes and Practice.cpp(37): error C2226: syntax error : unexpected type 'std::string' 1>C++ Notes and Practice.cpp(39): error C2065...
[3 replies] Last: Yes it worked, thank you! Alrededor , didn't realize the problem wa... (by BLooDiEMuRDA)
Deque question
 
Just started playing around with containers and am trying to create a Deque that will hold pointers to objects. (I'm not sure if its a good idea to do that but ...
[2 replies] Last: ah yes your right. I knew I had to specify it would contain POINTERS b... (by Deftwun)
Vector class question (1,2)
 
I've created my own class, "point2d", which i want to hold a vector array of x and y values. Then, in another class i make it a protected member function variab...
[20 replies] Last: yeah. it appears so. apologies about not including that bit of code. w... (by jazpearson)
Simple Base Conversion Problems
 
Problem solved, can't figure out how to remove the post so I just edited it. Thank you.
[1 reply] : For future reference, please don't delete your posts. Others may have ... (by Katma)
by Voyd
Calling a function with another function
 
Well our professor gave us a exam. I could not complete it so I have a 0 but I do want to actually learn how to do what he wanted us to acomplish. This progr...
[8 replies] Last: Thanks for the help will read the article :) (by Voyd)
Initialize Dynamic Array of a Struct in C++
 
Back in 2009 Ganellon [http://www.cplusplus.com/forum/beginner/7295/] asked about an exercise in Prata's C++ Primer Plus, Ch 4, Ex6 covering assignment of value...
[2 replies] Last: By the way, the original link is messed up in the post. http://www.cpl... (by kempofighter)
A messed up loop...?
 
I'm just starting to teach myself C++ from the tutorial on cprogramming.com, and I made a little command line program that asks you some questions and tells you...
[6 replies] Last: The tutorial I'm learning from hadn't told me about those data types y... (by closed account o9ypX9L8)
Results coming up as 0
 
I'm a beginning student learning about loops. My assignment is to write a program that will calculate the total amount of money for book sales at an online stor...
[3 replies] Last: Works perfectly! :) Thank you so much for your help!! (by llind212)
Copy constructors and temporary object generation
 
According to this wikipedia entry: http://en.wikipedia.org/wiki/Copy_constructor X a = X(); Should invoke the default constructor for X - creating a temp and ...
[4 replies] Last: Thank you to everyone who replied. I used an online c++ compiler (htt... (by digumarty)
Error - undeclared identifier, but I think I declared it.
 
Hi everybody. I'm doing my project which I was assigned at my C++ classes. It's about fire brigades. I created the basic classes and member functions declara...
[4 replies] Last: Thanks! It helped! (by vutives)
static const vs. const, when to use each
 
Hello! I'm wondering if I should use const vs. static const when defining a constant local variable within a function. I use static const instead of #define f...
[3 replies] Last: Wow! Thanks to both! (by formerBGIuser)
[SFML] errors when compiling a blank window
 
Hi, First I wanna warn you that my english little sucks, so don't judge me please :) I've just started to learn 2D programming, and I have little problem, I d...
[2 replies] Last: nvm,, I got it, I needed to include sfml-window-s.lib :P btw is there ... (by mekkatorqu)
by heidiK
tinyxml find End of Parent Node
 
Hello everyone Could anyone please help me how do I find the end of a parent xml node? E-g </MyApp> in the example below is the end of the parent node <MyApp...
[no replies]
Pictures from computers to a c++ program
 
I was just wondering if there was a way to upload a picture from your computer and put it in your program, if there is a way, then how, it would be so nice on t...
[6 replies] Last: Ok thanks everyone (by mrharris10)
April 2011 Pages: 1... 2930313233... 55
  Archived months: [mar2011] [may2011]

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