Beginners - November 2012 (Page 25)

by SMA01
How do I do this?
 
This is for my online computer science work, and I can't figure out how to start: Assume that Pre...
[1 reply] : You just need to loop through the array and sum the numbers in each el... (by freddy92)
Declaring Global Variables and/or Workaround
 
I'm using Code::Blocks and the GNU compiler, and I have a multi-file program. I have multiple functi...
[6 replies] Last: oh, you can do that? Interesting, I will investigate. (New to C++) (by bosox99)
Syntax Error
 
Hi. I'm making my first program. It's a simple calculator. I'm running it in Code::Blocks with a GNU...
[2 replies] Last: You have multiple places where you do stuff like if cin >> 0 What y... (by freddy92)
erase element from vector
 
say I have a vector with 8(0-7) elements. How do I delete the 4th element? vec.erase(vec.begin() ...
[1 reply] : In the second line, myvector.begin()+0 would be the 1st element, +1 wo... (by freddy92)
Reusing a pointer
 
Let's say we have this situation: int* arr = new int ; //Do some stuff that alters arr //Now...
[5 replies] Last: You could treat a pointer on which a "delete" has been applied to prac... (by Ramses12)
pointers to objects
 
Student *a; Student *b = new Student(); Student *c = new Student(); a=b; b=c; c=a; is this ^ t...
[2 replies] Last: If you don't want to write the code for swapping two things yourself ... (by Peter87)
by G3PO
Pointer Question
 
I'm doing a very simple pointer program just pointing to addresses and printing them, but I can't se...
[5 replies] Last: What does it mean to "dynamically create" something? For example, le... (by ResidentBiscuit)
Xcode Message "TERM environment variable not set"
 
I'm getting this message in my console when i'm compiling this code. I'm using Xcode and have search...
[no replies]
by Hucaru
Vector of class type.
 
Hi I am making an address book and it is going smoothly, however I have come across an issue that ha...
[2 replies] Last: Thanks I understand it now. (by Hucaru)
break two loops
 
I am suffering from the problem please anyone help me I have the following condition j=0; while(j...
[3 replies] Last: A nice and clean way to do that is to use a goto. j=0; while(j<9) {... (by toum)
no match to call
 
I'm having an error when I'm creating an object "as no match to call" My method is: void CPoiDa...
[3 replies] Last: If I understand correctly, you want to store into m_POI the object of... (by toum)
Why use dereference operator on iterators?
 
vector<string>::iterator myIter; vector<string>::const_iterator iter; vector<string>weap(3); ...
[3 replies] Last: Ah, that's more clear. Thanks :D (by DJLad16)
vector of pointers
 
I was wondering if there is a difference between: vector<Course*> courses; Course* cs = new C...
[5 replies] Last: got it! Thnx! (by eliranko)
Initializing array with function return value
 
Alright so I've got a function that creates an array that I need passed back to main(). How do I go ...
[4 replies] Last: Ah that is much smarter haha. Worked perfectly. (by ResidentBiscuit)
by Ameki
Stumped with IF
 
Hi Guys, I'm new here and was wondering if anyone can help me on this one problem I'm having, or exp...
[4 replies] Last: After putting that in the code works, sat back and pondered and realiz... (by Ameki)
Hi... Newbie here.
 
Hi everybody, I was hoping to introduce myself and get some advice. I was assigned to create an a...
[4 replies] Last: Ah, ok. So it's displayed for 1 sec, and then they have to type wha... (by andywestken)
by Niven
Help with textures
 
I'm trying to create a program that loads an image using SDL and converts it to an Opengl Texture th...
[7 replies] Last: I'm having a new problem now. The images are being displayed (finally)... (by Niven)
write to file multiple times
 
hello, I have a problem with writing to the same file in seperate cases. I opened a file ofs...
[4 replies] Last: Thank you guys! works now (by eliranko)
RTS Drag-box math
 
I'm working on an small RTS project and I've created a drag box to select units with but I'm not sur...
[7 replies] Last: You only need at most 2 for loops: One for each rectangle One for ... (by Disch)
how can I make these ones to reduce.
 
Okay so I got everything work on my code except this one part which I am not sure how I would. There...
[2 replies] Last: Thank you I got it! (by OLittleO)
November 2012 Pages: 1... 2324252627... 75
  Archived months: [oct2012] [dec2012]

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