Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 12 results for
usingnamespacestd
- Page 1
std::copy and istream_iterator
Programming
Software Development
13 Years Ago
by Ancient Dragon
…;iostream>#include<fstream>#include<iterator>
usingnamespacestd
;//typedefvoid(WINAPI*PGNSI)(constchar*);boolReadFile(constchar*filename){ifstreamin(filename,ios…
Can anyone explain this code to me ?
Programming
Software Development
9 Years Ago
by mridul.ahuja
…<memory.h> #defineDUMP 1 #defineMAX_FFA 1000 #defineMAX_D 1000
usingnamespacestd
; int D = 1000; // dimension of the problem int n = 20…
convert c++ code to mips code
Programming
Software Development
9 Years Ago
by sabaheen
#include<iostream>
usingnamespacestd
; constint MAX_SIZE = 200; int compare(intone[], inttwo[], intsize) { for(inti = …
Re: C++ Newbie, stumped with problem
Programming
Software Development
16 Years Ago
by hinduengg
… try out the logic with your setup // You should use -
usingnamespacestd
for C++ (exit(0) is a function to terminate the…
Re: Help writing script
Programming
Software Development
15 Years Ago
by RayvenHawk
… above structure: #include<iostream>#include<fstream>
usingnamespacestd
;.....
Re: std::copy and istream_iterator
Programming
Software Development
13 Years Ago
by mitrmkar
>> why this doesn't work correctly? The input stream has the [ICODE]skipws[/ICODE] format flag set, use [URL="http://www.cplusplus.com/reference/iostream/manipulators/noskipws/"]noskipws[/URL] to clear the flag.
Re: std::copy and istream_iterator
Programming
Software Development
13 Years Ago
by Ancient Dragon
Great :) Thanks.
Re: std::copy and istream_iterator
Programming
Software Development
13 Years Ago
by vijayan121
If the intent was to use std::copy and stream iterators, I have nothing to add. If the intent was to write a function to copy a file, this would be easier and also more efficient. [CODE]bool copy_file( const char* input_file, const char* output_file ) { return std::ofstream( output_file ) << std::ifstream(input_file).rdbuf() ; }[/CODE]
Re: Can anyone explain this code to me ?
Programming
Software Development
9 Years Ago
by Schol-R-LEA
Well, to begin with, this is a C++ program, not a C program, and a poorly written one at that. The header formats indicate that it probably dates back to the late 1990s, when the then-new C++ standard was still being formalized - either that, or the programmer didn't understand the standard correctly. Several critical values are hard-coded in …
Re: Can anyone explain this code to me ?
Programming
Software Development
9 Years Ago
by mridul.ahuja
Thanks for the early reply [Schol-R-LEA](https://www.daniweb.com/members/838005/schol-r-lea). Also I wanted to know, seeing a source code how can you tell if it's C or C++ when they are so similar ? I might get down votes on this weird question but I really want to know. It would be of great help if you could find me as easily understandable code …
Re: Can anyone explain this code to me ?
Programming
Software Development
9 Years Ago
by Schol-R-LEA
Well, the first thing to look at is the headers, both the names and the format of them. A C program will have headers in the form of `foo.h`, whereas in (modern) C++, the standard library headers will be `foo` without the extension. Now, this isn't a foolproof method, as there's a lot of pre-standard C++ code floating around, but if you see a …
Re: convert c++ code to mips code
Programming
Software Development
9 Years Ago
by rubberman
So, what is your problem? A C++ compiler on x86 or Mips systems should generate equally valid executables unless you are doing bit-manipulation and need to address little vs big-endian issues.
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC