Beginners - July 2011 (Page 31)

2D vectors
 
Is it possible to have a 2-dimensional vector? ie. vector<int> myVector (2)(2)
[2 replies] Last: Thanks framework. I was wondering why I was getting errors for that. (by pwnedu46)
by wtf
String pointers (1,2)
 
Why can't I delete them with delete s; break; when allocated with: s = new string ;
[23 replies] Last: I think polymorphism and virtual inheritance may make your life much ... (by wtf)
by toexii
Compiling FLTK
 
I've downloaded FLTK from fltk.org, unzipped the main folder. Now when I run fltk.dsw, MS Visual C++ 2010 opens and says: The project 'C:\fltk-1.1.10\visu...
[3 replies] Last: I'm glad you got it working, and thanks for posting the solution for t... (by kooth)
Inheritance and using in functions
 
Hey all, I've been playing around with inheritance and i have a big collision detection function that compares 2 types of object. Just recently i had written ...
[5 replies] Last: Yes thank you shacktar. I'm glad i checked back. It didn't compile in ... (by chr15chr15)
What is wrong with this small piece of code?
 
Here's the code: #include <iostream> #include <string> using namespace std; int main() { const string password = "qwerty"; string password1; cout<<...
[3 replies] Last: Ofcourse! Thanks guys. (by misterrr)
Help me get started
 
So now I have started learning C++ these days and found it exciting, so I thought I might as well install it on my computer too, I downloaded Microsoft Visual C...
[6 replies] Last: Alright thanks for the help, I can create programs now, the using nam... (by harry14)
relational expression querry
 
hello.. i was solving question and suddenly i came across this question int main() { float pi=3.14,x=2.5; int a,b; a=(pi==3.14); b=(x==2.5); ...
[7 replies] Last: @framework: hey hey man i 'm using oturboc because i'm familar to it..... (by pulkitsharva)
Find a string in an array
 
Alright so lets say I need to find a certain string in an array that has many different strings. how would i do a search of that array for a certain string? als...
[5 replies] Last: use strcmp(...); or string::compare(...); . For example: Using s... (by lnk2019)
function vs header
 
For the past couple weeks I've been writing a helpful program that keeps track of all of the electonic parts I have and I keep adding features so the program is...
[4 replies] Last: There's no right answer for that question. It depends entirely on how... (by Disch)
Iterator should read number from string. Stops after first numebr
 
I've written this code to extract numbers from a string using a string iterator. The iterator picks up the first number and decides to call it a day. Why's it ...
[6 replies] Last: This code works for me: #include <iostream> #include <string>... (by kooth)
by Rox
Pointer question: invalid conversion from int to int*
 
Why can´t I access the pointer in MyClass that points at the variable v ? How do I access it through a pointer? class MyClass { private: int v; ...
[6 replies] Last: Neither is more "preferable" than the other. It depends on the situati... (by Catfish)
why won't this read my file?
 
everytime I try to run this code I get some weird error, saying unhandled exception at so and so memory address. #include "stdafx.h" #include <iostream> #...
[3 replies] Last: Not without parsing the whole file first. But you can use a vector of ... (by bartoli)
by daphne
convert string array to char array
 
Hi Does anyone know how to convert from string array into char array? Thanks...
[2 replies] Last: string array or string ? (by sohguanh)
Need help with an error
 
Ok so I decided two nights ago to try and build a simple game like program in the console. No graphics, and nothing special. Everything was going fine until I t...
[7 replies] Last: Thank you very much. Oh and the reason i put twelve was because thats ... (by Ichbinkenny)
dev-C++ settings
 
For any wsDev-C++ users out there, do you know if there are any settings for the debug window? It floats on top of the rest of the IDE, making it impossible to...
[1 reply] : I might be able to help if you can take a screenshot of this. (by Ichbinkenny)
by smelas
char loop
 
Hi, How can write this in a loop ? char *names = {"Name_1_sur_1", "Name_2_sur_1", "Name_3_sur_1", ...
[9 replies] Last: it's good example to learn some about strings and so on. thanks shac... (by smelas)
by wraith
adding values to vectors using cin
 
Ok so I am learning c++ and I tried to use push_back to add values to a vector using cin to get the values. However it keeps giving me some errors that I have m...
[4 replies] Last: just place system("pause"); in main before return statement. int ma... (by shahj)
if(input = letter)?
 
Hello, before I ask my question i'd like to say thanks for looking at my question. Ok so, I am making a converter for Celsius into Fahrenheit vice versa. I am s...
[5 replies] Last: You need to make sure about case as well meaning if ( degree =='c' ... (by shahj)
Selection Sort [ARRAY]
 
This code work, but I firgue the style is very inefficient. As a good programmer, a decent style of writing is significant. Any good suggestions from experts? D...
[1 reply] : You aren't dynamic allocating anything, ¿how it could leak? templat... (by ne555)
Overloading Operators Program
 
Any help you can give with this is greatly appreciated! First, here are the instructions for the program: Program 2: Overloading operators Take the Fra...
[3 replies] Last: http://www.cs.caltech.edu/courses/cs11/material/cpp/donnie/cpp-ops.htm... (by ne555)
July 2011 Pages: 1... 2930313233... 54
  Archived months: [jun2011] [aug2011]

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