Beginners - January 2011 (Page 20)

min and max??
 
Hi all, i have a certain question. Why that doesnt work?It gives zeros for min and max always.If i dont define them as zeros, there appear numbers like min - 4...
[10 replies] Last: A final thought; what happens if you start by setting min to equal zer... (by Moschops)
by WingYn
How to access method from another source file?
 
Hi... I have been struggling concerning using methods from another source file... For example I have a file called a.cpp, and I have a function in it in...
[8 replies] Last: That's right. This is not Java; you do not have to have a class contai... (by Zhuge)
Changing random() output to ordered/fixed outputs...
 
I found some source code online and I found it quite good, so I decided to base my project on the source code. But I'm in a problem. I'm a noob at C++ so I'm ha...
[no replies]
How could I copy the resource of unique_ptr?
 
std::unique_ptr<int> A(new int(4)); std::unique_ptr<int> B; B = std::move(A); I could "move" the resource to B, but how could I copy the resource to B...
[4 replies] Last: Well, I can't really answer either of your questions because I don't u... (by jsmith)
STRCMP receives error
 
I am getting an error when I am trying to do a strcmp. char* type; void DECLIST() { if (strcmp(type, "LOCAL") == 0 || strcmp(type, "GLOBAL") == 0) ...
[1 reply] : ...strcmp(type, "WHILE") == 0 strcmp(type, "FOR") == 0... What ha... (by Moschops)
Struct and Class
 
OK first of all here's the struct struct mystruct { int i; float f; } mystruct ms; ms i = 45 ms f = 22.6 Then i am to convert my struct into a...
[1 reply] : There are many problems with your class: * get i ( and get f ) ar... (by Bazzy)
New programmer - could use some comments on my code
 
Hi everyone, I am a new c++ programmer and would appreciate if someone had the time to check out some code I wrote and let me know what you think. The code ...
[7 replies] Last: besides the container of stl there are also some smart pointer could ... (by stereoMatching)
by exca
question about pointer-parameter
 
Hi all, In my program I have a function like: int dfsArea(Rectangle * currentRect, int n, vector<Rectangle*> myvector, int & area, Rectangle * root){ .....
[2 replies] Last: I think I should post more of the code. Rectangle class is: #include... (by exca)
by aatwo
Make file duplicate output?
 
Hi. I was wondering, I have a make file which I use to compile my c++ project in ubuntu linux and every time I compile I have to copy and paste the binary to se...
[4 replies] Last: Hi. I was wondering, I have a make file which I use to compile my c++... (by Moschops)
by omaid
Get wrong output while setting precision for ofstream
 
Hi, I have the following problem: For the following code segment vector <double> res; res.push_back((double)number); res.push_back((double)per...
[2 replies] Last: [quote=hanst99]The problem is that conversion from int to float isn't ... (by filipe)
by Tanax
Is there a string compareTo() ?
 
Hi! I'm wondering if there's a similar function to the Java String::compareTo() function?? E.g. one that will not only compare the 2 strings but also take in...
[4 replies] Last: Oh! That simple. Thanks :) (by Tanax)
How Do I Create a Variable Without Initializing It?
 
I just switched universities and am taking a data structures class now. I have the prerequisite intro to OOD class from my previous university, but they only ta...
[2 replies] Last: That was exactly what I needed. Thanks for the help! (by tylara67)
Importing BITMAP
 
Hi, I wanted to know is there any way to import bitmap image in a c++ program just like importing data from text (.txt) file and analyse it pixel by pixel? ...
[9 replies] Last: You're welcome mate ;) (by Ramses12)
derive to base
 
can anyone explain that????? class Base { public: virtual void foo(); }; class Derived: public Base { }; void f(Base * &a) { } void main( ...
[7 replies] Last: Hold on. Original code (slightly edited for brevity and to demonstr... (by jsmith)
Question on sorting
 
Can you guys take a look my code below? I am trying to sort the data by netpay ( firstname, lastname, net pay). Included for statements for names in the for sta...
[3 replies] Last: Can you guys please give me some pointers? I believe the error is in t... (by cplusplusrookie)
3d library
 
Hello, I made some C++ coding wen I was in school (long time ago). My question is for my curiosity. I like to know how can be done an aplication that can hav...
[1 reply] : Look up perspective projection, OpenGL, transformation matrices. For t... (by rocketboy9000)
Splitting a program across multiple files
 
Hi, I'm learning how to use multiple files for a single program, I made a successful example in which I called a member of a class in another cpp file. But whe...
[2 replies] Last: thanks (by mr kazoodle)
by acorn
code blocks IDE
 
I just wanted to get everyones opinion on code blocks IDE. I decided to try it out because I was using Microsoft Visual c++ express and it kept allowing me to u...
[13 replies] Last: don't mind, I solved the problem already <QT4 directory>\bin\moc... (by stereoMatching)
by throne
find codding L-system using c++ for corn tree
 
i wan to find a coding that using L-system for corn tree germination that using c++.... can some one give me a coding... thanks for your cooperation...
[6 replies] Last: By the way, what is the grammar describing the L-system you want to si... (by Bazzy)
problem with SFML and code::blocks
 
so i followed all the instuction: SFML\include --> CodeBlocks\MINGW\include SFML\lib --> CodeBlocks\MINGW\lib Compiler and debugger menu, Global compiler set...
[no replies]
January 2011 Pages: 1... 1819202122... 42
  Archived months: [dec2010] [feb2011]

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