Search Results

Search: Posts Made By: vistastar
Forum: Programming 12-06-2012
2,095
Posted By vistastar
#include<cmath> #include<cstdlib> ...
#include<cmath>
#include<cstdlib>
#include<iostream>
#include<fstream>
using namespace std;
int main ()
{
char filename [25];
ifstream myfile;
cin.getline(filename,25);...
Forum: Programming 12-05-2012
2,095
Posted By vistastar
you need: myfile.getline(number,25); and atoi().
you need:
myfile.getline(number,25); and atoi().
Forum: Programming 12-04-2012
3,475
Posted By vistastar
You can ignore operator=, since I don't use it. ...
You can ignore operator=, since I don't use it.

I mean, If I comment out that line copy ctor, g++ will generate one, and it tries to call Uncopyable(const Uncopyable &rhs){cout<<"oooops\n";}, and...
Forum: Programming 12-01-2012
3,475
Posted By vistastar
Thanks, but I want a more precise answer...
Thanks, but I want a more precise answer...
Forum: Programming 12-01-2012
3,475
Posted By vistastar
About uncopyable class (on book:Effective C++)
See the following code:

#include<iostream>
using namespace std;
class Uncopyable
{
protected:
Uncopyable(){cout<<"hehe\n";}
~Uncopyable(){}
private:
Uncopyable(const Uncopyable...
2,522
Posted By vistastar
I thought OS don't allocate any swap area nor...
I thought OS don't allocate any swap area nor physical memory to a new got virtual space, but allocate physical pages directly when this space is written/read, and swap out when done some thing.Do...
2,522
Posted By vistastar
1, reasonable 2,don't understand 3,AFAIK, on...
1, reasonable
2,don't understand
3,AFAIK, on linux threads' stack is allocated on heap of the main thread and managed by thread lib.
4,if the operating system allocate a very large heap to a...
2,522
Posted By vistastar
Is virtual memory so precious? about brk()
We know for every process, it has 4G virtual memory on a 32bit machine.
since virtual memory is not physical memory, why don't operating system allocate all it's virtual memory to it, but set a...
Forum: Programming 10-05-2012
4,002
Posted By vistastar
That's good. But what is the backward of my...
That's good. But what is the backward of my implementation? If I change the static variable num to any other integer such as 3, I can get a class that can only be initialized three times. Isn't it...
Forum: Programming 10-04-2012
4,002
Posted By vistastar
but if the user use the public function to...
but if the user use the public function to instantiate a second time, it can also only be detected at run time. Isn't it?
Forum: Programming 10-03-2012
4,002
Posted By vistastar
C++ singleton
How to write a class that can only be instancialized once?

what about my implementation below?


#include<iostream>
#include<stdexcept>
using namespace std;

class Singleton
{
public:
...
2,149
Posted By vistastar
locale and glibc and charset
what's the relationship among locale, glibc, charset, charmap and fonts?
why locale needs to be generated by glibc? how?
what are in the locale-archive file?
and what are in font files?
Forum: Programming 02-21-2012
10,171
Posted By vistastar
'var' should be initialized or assigned a value.
'var' should be initialized or assigned a value.
Forum: Programming 02-21-2012
7,994
Posted By vistastar
'result' must be a global array or static array. ...
'result' must be a global array or static array. And the return type of matmultiply should be int **, since you can't really return an array in C.
Forum: Programming 01-04-2012
2,055
Posted By vistastar
Just sleep() your program, then wake up it when...
Just sleep() your program, then wake up it when you need.
Forum: Programming 12-18-2011
11,383
Posted By vistastar
define another two semaphore: sem_t zero,...
define another two semaphore:

sem_t zero, one;

a thread wait for zero and post one, while the other thread wait for one and post zero.
Forum: Programming 12-11-2011
1,695
Posted By vistastar
try system("clear");
try system("clear");
1,974
Posted By vistastar
Of course. In bash try $help while example: ...
Of course. In bash try
$help while
example:
i=4; while [ $i -gt 0 ]; do echo $i; let i--; done;
Forum: Programming 11-30-2011
7,156
Posted By vistastar
it isn't what I want. I need a tool like winhex...
it isn't what I want.
I need a tool like winhex which can check the entire virtual memory of a process.
Forum: Programming 11-28-2011
7,156
Posted By vistastar
Make cannot generate .ko linux kernel module
cannot generate .ko file on my linux, although it can generate module.symvers.
But when I copy .c file and Makefile to another linux computer, there's no problem.

The strange thing is: make is...
1,344
Posted By vistastar
see the entire memory of a process
How to see the entire memory of a process in hex?
Forum: Programming 11-23-2011
3,527
Posted By vistastar
linux kernel mm_struct
In this struct there are start_stack(start address of user space stack) and stack_vm(mount of pages of stack).

But why it doesn't have a member like end_stack?
Is it right to figure the end...
Forum: Programming 11-23-2011
10,104
Posted By vistastar
Thank you Corona688...
Thank you Corona688 (https://www.unix.com/members/43551.html)

Thanks for your patient and zeal. I will study the kernel earnestly. One years ago, I know nothing about linux. It is UNIX.COM who...
1,634
Posted By vistastar
somebody?
somebody?
5,718
Posted By vistastar
It is not that complex. The folowing works...
It is not that complex. The folowing works perfect on bash.


ls !(*.jpg|*.xml|*.sql)
Showing results 1 to 25 of 179

 
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy