@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12



Comments:

<0> hi, just wondering what's point of using inline functions where the body of the function is said to be substituted whereever the func. is called?
<1> that is the point, to have the body inlined where the function call would otherwise be
<1> it's a potential optimization
<0> nothing else?
<1> not that I can think of
<2> it removes the overhead of a function call
<2> like say you have a 3 line function that gets called 10000 times in a loop
<0> yes
<0> never heard of this mechanism before
<1> calling a function normally pushes stuff onto the stack and causes a branch
<1> inlining eliminates the overhead
<0> reminds me of how regex patterns can be compiled in py/perl to enhance performance
<1> you trade size for speed
<2> in python you can compile the whole script
<1> the inline keyword is usually just a hint - a compiler can feel free to ignore it if it thinks it's better that way
<2> well, guss you can in perl too with perlcc



<0> ok
<3> how, a have a strig as an array of char, how can i make a array of a array ? :D
<1> you probably should prefer vectors
<1> and you shouldn't be using arrays of char as strings
<1> C++ has a string type
<3> whell
<3> i seem to have a problem with the string type
<1> ?
<3> and use amespace std; i need to parse a file, fstream doesnt seem to work with the std namespace for me :(
<1> you'll need to be a little more vague
<4> #include <fstream>
<4> using namespace std;
<4> fstream foobar;
<4> Easy enough.;
<5> True;
<4> Even Khan could do it.
<5> He probably could;
<3> lew, what a sec
<0> anybody here been involved with parallel computing?
<3> where ca i paste?
<1> read the topic
<3> oops, sry :D
<5> Does it count when your code is running on more than 200 machines each with 4 CPUs and running in a cluster?
<2> and the parens aren't part of the URL
<1> no, Ashe`;
<5> Too bad;
<3> http://www.noidea128.org/sourcefiles/15810
<1> meh
<1> calc no .h
<6> no .h = Headers introduced by Standard C++ have no .h extension (e.g. <iostream>, <cstdio>). Prefer these to proprietary C++ headers that conform to no formal standard (e.g. <iostream.h>) and to Standard C headers (e.g. <stdio.h>), inherited by Standard C++ for backwards compatibility. See also: http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4
<2> calc main
<6> main = int main() { return 0; } or int main(int argc, char *argv[]) { return 0; }
<2> C++ doesn't even have implicit declarations afaik
<1> nope, main(){} is invalid
<7> Also, it might be wise to check for typos in variable names before uploading
<2> um, and plus the error is because you declared it as 'lie' and used it as 'line'
<7> Reading the error messages helps as well
<1> why would anyone want to read error messages
<3> http://www.noidea128.org/sourcefiles/15811
<2> seriously, that's as dumb as reading contracts and subpoenas
<2> returnn 0;
<2> that doesn't sound right
<3> thats not the problem :D
<3> i misstyped
<3> http://www.noidea128.org/sourcefiles/15811 < using gcc version 3.3.6
<8> guys is there a way to add a foler to g++ library/objects search paths ?
<3> any ideeas whats caousing the error?
<8> I searched the "ld manpage" with no luck at all
<7> read the error message nightmare
<3> read it
<8> s/foler/folder
<1> niGhTm4r3|bu - main(){} is illegal.
<7> Darwish - Sure, just ask gcc. Read it's man page, or try gcc --?
<3> its main() {}
<1> no
<1> it's int main() {}
<7> Not unless you want it to be wrong
<7> I also believe you typed it right the first time
<3> isnt int main = main?
<8> Asriel, fool me .. I searched the man page of ld only .. thanks
<1> only in C, niGhTm4r3|bu



<7> Check your source, make sure you actually have string line; and not string lie;
<3> oh..
<7> then clean compiole
<1> and since you've apparently re-typed this and not actually copied from the actual code, who knows what's actually there
<7> Darwish - Oh, ld can probably do it as well, but I just have gcc link for me unless I'm using make
<8> Asriel, actually the ld manpage was too complicated
<3> http://www.noidea128.org/sourcefiles/15812 < this is why i actualy came here for..
<1> well, you used getline wrong
<0> when I do: g++ -I. -O2 -c X.cpp main.cpp
<0> is that said to produce libraries?
<0> or a library
<0> I get *.o files
<2> -c means just compile to ojbects
<2> no linking
<2> what are you trying to do?
<1> niGhTm4r3|bu - you're looking for the free function std::getline();
<0> playing with a cl*** in a header file, the body of the operator overloadings, member function in a *.cpp file
<0> then a main.cpp to test
<0> what is a library then cn28h ?
<3> basic_istream& getline (char_type* s, streamsize n );
<3> basic_istream& getline (char_type* s, streamsize n, char_type delim );
<1> niGhTm4r3|bu - doesn't look like it.
<0> http://www.noidea128.org/sourcefiles/15813.html
<3> uhm.. how can i get a lie from a file? ?
<3> thats what i realy wat to do
<1> [17:24] <1> niGhTm4r3|bu - you're looking for the free function std::getline();
<9> why are you using stream.getline() ?
<2> corstan, you just want to build a binary to run?
<0> yes
<3> uhm.. if i dont use using namespace std; stream.getline() works
<0> wait, I'll give you the func. bodies too
<2> well if you've already got the objects
<2> g++ -o foo *.o
<9> niGhTm4r3|bu what's your point?
<9> stream.getline will work even if you do using namespace std
<9> or your compiler is screwed
<0> cn28h, http://www.noidea128.org/sourcefiles/15814.html
<9> the problem w/ stream.getline() is that you need a char array
<0> try compiling and linking with this main.cpp:
<1> corstan what is this?
<3> solved my problem usig std:getline, thanks rdragon
<0> http://www.noidea128.org/sourcefiles/15815.html
<0> rdragon, it's a vector cl*** to represent mathematical vectors
<9> corstan and you're writing it why?
<0> and perform some elementary operations
<1> it is?
<0> it's an exercise in learning cl***es and OOP in C++
<9> given that std::vector exists
<0> educational, not very effective I know
<0> I'll ignore that std::vector exists
<0> until now
<1> why are you using signed values for indexes & sizes ?
<0> but the problem I have to build a binary is that I can't get the objects to link up
<9> your operator = has a severe error in it
<0> vawjr, I get these errors when doing this: g++ -o MyVector_prog main.o MyVector.o -lm
<2> http://noidea128.org/sourcefiles/15816~
<1> cn28h I like how you filed him under 'junk'
<0> http://www.noidea128.org/sourcefiles/15817~
<2> I put everything under junk :D
<2> lol
<9> well, you ought to fix that 1st one before anyone looks at any of the others
<0> cn28h, heh
<9> since it cannot find the headier file for your cl*** it's kinda pointless looking at anything else
<9> it's all meaningless
<0> what's the 1. error mean?
<0> my operator+ is ****ed?
<9> no
<3> is there something like strstr() but for strings?
<9> main.cpp:5:22: MyVector.h: No such file or directory
<9> what's that error?
<9> niGhTm4r3|bu yes
<9> get a damned book
<9> we're not here to teach basic stuff
<9> I recommend the books here: http://rudbek.com/books.html


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

karozzi armati
#windows
04elsa
#php
techraven
#MissKitten
#gentoo
#linux
coments cards reports+math
PostgreSQL configuration script pg_config not found



Home  |  disclaimer  |  contact  |  submit quotes