Beginners - June 2011 (Page 12)

by Brody
C++ Mentor or Coding Partner
 
I'm currently attempting to simulate some type of robot or buggy within the physics simulator Open Dynamics Engine (ode.org) and then apply some Reinforcement L...
[1 reply] : I don't have any previous experience with ODE, but I'd be happy to hav... (by esotera)
Creating an Array of indefinite size
 
I want to create a program that will keep the records of a number of people. I have created a struct Person_t . Now I want to create an Array that will hold th...
[9 replies] Last: That explains it! Thanks a lot for the help... (by Nisheeth)
by caneta
Emulate awk
 
I have a string like the following: string myStr = "Monthly Ecosystem NPP = 0.360591 tDM/ha month"; How can I isolate 0.360591, as I would do in bash wi...
[2 replies] Last: Thank you so much...Meanwhile I've solved with the following: string... (by caneta)
subclassing the string class
 
hi, As I am writing a program to handle some csv files, I wrote some functions that handle strings which I would like to add to the string class. So I am at ...
[2 replies] Last: hm, I feel pretty stupid right now ;) Thanks a lot! (I will follow y... (by mr kazoodle)
by badny
Get string length
 
Hi there! I´m trying to get the length of a string, but I get error when I do: strlen(Ficha.Market); Market is a string, inside Ficha struct: st...
[3 replies] Last: http://www.cplusplus.com/reference/string/string/substr/ (by Moschops)
"new" operator
 
Here are two simple functions. void function1(){ double *a = new double ; a = 10.0; for(int i=1;i<36;++i) a =4.0*a[i-1]; ...
[6 replies] Last: Why would one want to write your own version of new? Here are three pr... (by Moschops)
Multiple Inputs from DAT file
 
Hello Everyone....i am having a small problem in c++.I have to take input from a DAT file which contains say 50 values of x, 50 values of y, 50 values of z etc....
[1 reply] : I assume that each x, y and z is in 1 row like this: 1 2 3 4 5 6 ....... (by eraggo)
Programming a GUI
 
I have been studying programming for almost three years as a hobby and just finished reading through a book that had many examples of console applications.Now t...
[13 replies] Last: I was just absolutely sure that you can write only in C++/CLI (by vonpik)
Encryption Methods
 
#include <iostream> #include <string> #include<fstream> struct data{ std::string extension; short int* mydata; int size; }; using namespace std;...
[6 replies] Last: Actually there are Open Source C++ library around which you can use in... (by sohguanh)
by snakec
file handling question
 
Hi I'm new to c++. I'm working on a code which got a code line following: code : class TextUpwardProtocol: public UpwardProtocol { private: FILE*...
[2 replies] Last: For FILE* _stream or other pointer variables, it is always wise to che... (by sohguanh)
Pointer to const location, '&' and copy CTor
 
Hi, is int foo(int&) same as int foo(int *const)? if yes than in case of Copy Ctor why cant we have X(X* const) instead of X(X&)? ...
[1 reply] : I don't think it is the same. pointer can point to NULL at run-time wh... (by sohguanh)
by tonnot
Cant write a stream buffer to binary file ...
 
I create this buffer for my stringstream. char mybuffer ; the_stream.rdbuf()->pubsetbuf(mybuffer,265536); Aslo I have a fstream FILE object. Ok...
[no replies]
by Hexa
what exactly *this pointer is doing?
 
hi again all of my bros and dear experts here i know whats this doing totally i know its memory address of our object and point on it but in point to something ...
[4 replies] Last: thanx mate and what about post increment. idea is "this" get our obj a... (by Hexa)
by Gene
Help With Random Numbers
 
Hello, I have this piece of code here void Generate_Square_Room_Randomly(int rows, int columns, char world ) { srand ( time(NULL) ); int room_hieght...
[5 replies] Last: Ok, redid the code a bit and fixed some problems confusing X and Y, ho... (by Gene)
by ty98
rc data
 
How do I use the rc data? If its for like files in the program itself then how would I use it to extract a program?
[2 replies] Last: look at this http://msdn.microsoft.com/en-us/library/aa381039%28v=vs.8... (by coder777)
by jorjoo
too many characters in constant?
 
Hi, so i was practicing c++ variables and switch statements today and I was almost positive I did this correctly. However, when i try to write in a 'case' for m...
[9 replies] Last: thanks, this could definitely come in handy in the future. (by jorjoo)
by sebgar
Static Member variable
 
How do you initialize a static variable when it's a struct?? i can't make it work... struct sommething { int a; int b; }; class Myclass ...
[6 replies] Last: If you wanted to initialize a and b separately you'd have to do it lik... (by shacktar)
Nested If statements..
 
if... if... if... if... } } } } is it a good programming practice? because it looks like that this practice ...
[3 replies] Last: if(condition1 && condition2) Use that for having multiple conditions... (by Intrexa)
Indexing arrays
 
Would you mind offering me a little feedback? I thought that I had figured out a clean-cut way of initializing the data for the two multi-dimensional arrays wh...
[1 reply] : No you can not use strings as indexes in arrays. All of the const... (by binarybob350)
Encrpytion (1,2)
 
I am wondering how to do some simple encrpytion for some files i have on my computer. My teacher put a file on our computers, and told us to make a program to e...
[21 replies] Last: Well now I ask another question. Can data in a class be search in the ... (by pilot538)
June 2011 Pages: 1... 1011121314... 41
  Archived months: [may2011] [jul2011]

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