
please wait
by bdwg
Declaring a vector in a header file.
|
I have two problems. 1. I would like to make a vector with initial length, say 10, within a class. The vector's elements are from another class. Class P... |
Dec 30, 2012 at 3:14am
[2 replies] Last: Thanks! For anyone who this might help: To fix it, in the constructor ... (by bdwg)
|
by metulburr
storage size of array isnt known error
|
i am not really sure what to do. char a ; I thought that this was the way to declare an unknown array? I was initially trying to convert the string into an ... |
Dec 30, 2012 at 2:09am
[2 replies] Last: A string is already an array of chars. You can obtain a pointer to the... (by Cubbi)
|
by Xecutive
Use of "%" operator in this way.
|
I need a little help in understanding this, if someone could. if ((iii % 3)==0) continue; I was told that if iii was divisible by 3 the if statement... |
Dec 30, 2012 at 2:03am
[1 reply] : It's the modulus operator: its job is to divide the left operand by th... (by closed account zb0S216C)
|
by metulburr
attempting to index strings
|
coming from python this would seem like valid code, but it gives warnings and "-fpermissive g++ will accept your code" So i am assuming there must be a bette... |
Dec 30, 2012 at 1:18am
[4 replies] Last: ah yes, the {} and semicolons. I always forget them. Thanks I have an... (by metulburr)
|
by soje
chai.lib
|
I'm trying to build a soultion in MVC++ 2010, a JUCE interface. However, when I get this error: LINK : fatal error LNK1104: cannot open file 'CHAI.lib' ... |
Dec 30, 2012 at 1:05am
[2 replies] Last: Thanks for your kind reply :-) I guess I wasn't quite clear. I realiz... (by soje)
|
by adrem7
Getting used to functions (tidying my code)
|
I have several long pieces of code, but never bother using functions in them as it is just another thing to learn. I just wanted a bit of help with creating my ... |
Dec 30, 2012 at 12:08am
[1 reply] : I suggest you to look at std::valarray it allows you to operate wit... (by ne555)
|
by metulburr
confused on results
|
I am confused on why while (! (cin >> num_grade)) would be false on the condition the input was not a number, being num_grade as type int? #include <iostre... |
Dec 29, 2012 at 11:10pm
[2 replies] Last: ok i didnt know that it has the ability to do that by itself, thanks. (by metulburr)
|
std::cout and using namespace std? |
What's the difference between std::cout and using namespace std? is std::cout a difference programming? |
Dec 29, 2012 at 10:36pm
[13 replies] Last: I prefer to use it. Always avoid it in header files, though. (by moorecm)
|
by metulburr
unable to overload function
|
How come this works for int and string but it wont for float? #include <iostream> using namespace std; class Builtin{ public: void print(std::str... |
Dec 29, 2012 at 10:25pm
[2 replies] Last: Or use float the specifier on your floating point number: build.print... (by jlb)
|
by joseplusplus
Is there a difference between the terms: Dynamic Array and Variable Length Array?
|
Hello there! While looking at the google C++ style guide I noticed they mention they don't allow variable length array s (VLAs) in their code. I was jus... |
Dec 29, 2012 at 9:45pm
[6 replies] Last: Thank you very much, those are interesting thoughts. :) I appreciate y... (by joseplusplus)
|
Validation from values in a Vector Array |
I'm trying to do a validation from int values in a vector. I've tried using pointers and a bunch of different arguments in while and do-while loops with no avai... |
Dec 29, 2012 at 9:00pm
[1 reply] : There's no way for us to advise you without seeing your vector and how... (by Zhuge)
|
by flony1
questions about implementation and linking
|
hello friends ... I will not be breaking the rules of the forum with the question that will, no studio on vacation programmer and I said let's read a book of c ... |
Dec 29, 2012 at 8:29pm
[2 replies] Last: thank you very much. The solution to my problem. static libraries. arc... (by flony1)
|
by Quentin
g++ supports two ways of calling a function from the std namespace
|
Hi there, I'd like to know why is the following code correct according to g++: #include <cstring> #include <iostream> int main() { std::cout << strlen(... |
Dec 29, 2012 at 7:57pm
[2 replies] Last: the standard specifically allows implementations to include strlen( ) ... (by Cubbi)
|
Urgent help required for a grading system |
hey guys, im new to C++ and im doin an assignment. In my problem, you gotta search for a student's name and then make the program display the name, correspondin... |
Dec 29, 2012 at 5:57pm
[3 replies] Last: @jlb and @Chervil , thnks so much guys!!! I tried it n it works! how s... (by skyfirestalker)
|
by metulburr
including header causes error, but including cpp does not
|
in main.cpp if i include the header files, it raises the error metulburr@ubuntu:~/Documents/cplusplus/composition$ g++ main.cpp -o main /tmp/ccb7S83C.o: In fu... |
Dec 29, 2012 at 5:56pm
[4 replies] Last: > What if you wanted to distribute the source instead of pre compiling... (by JLBorges)
|
by Rubikkon
vector subscript out of range
|
I've been using visual C++ Express to work through some elementary exercises... After I receive the message "vector subscript out of range", I am given the ... |
Dec 29, 2012 at 5:37pm
[4 replies] Last: #include <iostream> #include <string> #include <vector> #include <alg... (by JLBorges)
|
Rename Problem... |
Hi! Look At this code: #include <iostream> #include <conio.h> #include <cstdlib> #include <cmath> #include <fstream> #include <string> #include <stdli... |
Dec 29, 2012 at 3:02pm
[3 replies] Last: I didn't get that particular error. But it would suggest the remove()... (by Chervil)
|
by Guzfraba
seekg = sekkp ? :|
|
Hello ! I read about seekg and seekp,but i didn't understood what they do.... I've tryed this both codes: #include <iostream> #include <fstream> using... |
Dec 29, 2012 at 2:20pm
[5 replies] Last: Yes, this is what file streams do. They have only one position, both s... (by Cubbi)
|
by cesar521
What certains things do?
|
Hey are there any sites that say what certain things do? For example, lets say i wanted to know what a float was or what writeprocessmemort does, i would just t... |
Dec 29, 2012 at 1:38pm
[2 replies] Last: At the top of this very page, there is a search box. :) (by Chervil)
|
by donfire
array problem, pointer dynamic memory???
|
am using c++. i have this code which prints out a result like this on the screen ; first numbers are ; 23, 25, 56, 75, 65, second numbers are; 45, 87, 90... |
Dec 29, 2012 at 12:53pm
[1 reply] : Sure, that's what std::vector is for. (by Athar)
|