Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 10-19-09   #1 (permalink)
4.0 GHz
 
MeeksMan13's Avatar
 
intel nvidia

Join Date: Dec 2008
Location: Dripping Springs/Denton
Posts: 885

Rep: 45 MeeksMan13 is acknowledged by some
Unique Rep: 43
Trader Rating: 1
Default Vectors in C++

I'm wondering when to use "." and "->" when working with vectors in C++

can anyone help
__________________
I'm a junior in college, Comp Sci major/math minor, if you wanna talk, send me a pm

The *OFFICIAL* HAF 932 Case Owners Club My HAF 932 Paint Job

Water Cooling (own red, need black)
Click below to show/hide Hidden Text Below!

Apogee XT
TFC XChanger 360
1/2" Black Barbs
10' 7/16" Tygon
EK D5 Pump Top

Bay Res (Potentially Inverse T-Virus)
Swiftech MCP655 Vario
Need: $150


Quote:
Once I went out and got drunk. then came home and thought it would be a good idea to overclock enough join the 100% overclockers club. Lesson learned: you CAN'T get to 6 GHz when you're hammered.-pfritzmorkin

System: The Factory
CPU
E8500 @ 4.25 gHz
Motherboard
EVGA 780i FTW
Memory
Patriot Viper 2 x 2 GB PC 8500
Graphics Card
2x GTX 260
Hard Drive
Samsung 750GB 7200 RPM; 300 GB Seagate
Sound Card
Creative X-Fi Platinum w/ FD Bay
Power Supply
OCZ 700w Fatal1ty Edition
Case
HAF 932 (Painted)
CPU cooling
Hyper Z600R (Apogee XT soon)
GPU cooling
Stock
OS
Windows 7 64 bit
Monitor
Acer 22" X223W
MeeksMan13 is offline   Reply With Quote
Old 10-19-09   #2 (permalink)
With great difficulty
 
rabidgnome229's Avatar
 
intel nvidia

Join Date: Feb 2006
Location: Pittsburgh
Posts: 5,210

Rep: 614 rabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famousrabidgnome229 is becoming famous
Unique Rep: 370
FAQs Submitted: 6
Trader Rating: 5
Default

-> is for use with pointers

Code:
#include <vector>
#include <iostream>

using std::vector;
using std::cout;
using std::endl;

int main(void){
    vector<int> stack;
    vector<int> *heap = new vector<int>;

    stack.push_back(1);
    heap->push_back(1);

    cout << stack.size() << " " << heap->size() << endl;

    return 0;
}
__________________
System: It goes to eleven
CPU
E6300
Motherboard
DS3
Memory
2GB XMS2 DDR2-800
Graphics Card
EVGA 8600GTS
Hard Drive
1.294 TB
Sound Card
Audigy 2 ZS
Power Supply
Corsair 520HX
Case
Lian-Li v1000B Plus
CPU cooling
TTBT
GPU cooling
Thermalright V2
OS
Arch Linux/XP
Monitor
Samsung 226bw
rabidgnome229 is offline Overclocked Account   Reply With Quote
Old 10-19-09   #3 (permalink)
4.0 GHz
 
MeeksMan13's Avatar
 
intel nvidia

Join Date: Dec 2008
Location: Dripping Springs/Denton
Posts: 885

Rep: 45 MeeksMan13 is acknowledged by some
Unique Rep: 43
Trader Rating: 1
Default

awesome man. thanks a bunch
__________________
I'm a junior in college, Comp Sci major/math minor, if you wanna talk, send me a pm

The *OFFICIAL* HAF 932 Case Owners Club My HAF 932 Paint Job

Water Cooling (own red, need black)
Click below to show/hide Hidden Text Below!

Apogee XT
TFC XChanger 360
1/2" Black Barbs
10' 7/16" Tygon
EK D5 Pump Top

Bay Res (Potentially Inverse T-Virus)
Swiftech MCP655 Vario
Need: $150


Quote:
Once I went out and got drunk. then came home and thought it would be a good idea to overclock enough join the 100% overclockers club. Lesson learned: you CAN'T get to 6 GHz when you're hammered.-pfritzmorkin

System: The Factory
CPU
E8500 @ 4.25 gHz
Motherboard
EVGA 780i FTW
Memory
Patriot Viper 2 x 2 GB PC 8500
Graphics Card
2x GTX 260
Hard Drive
Samsung 750GB 7200 RPM; 300 GB Seagate
Sound Card
Creative X-Fi Platinum w/ FD Bay
Power Supply
OCZ 700w Fatal1ty Edition
Case
HAF 932 (Painted)
CPU cooling
Hyper Z600R (Apogee XT soon)
GPU cooling
Stock
OS
Windows 7 64 bit
Monitor
Acer 22" X223W
MeeksMan13 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 04:37 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.13182 seconds with 8 queries