I am trying to generic way to convert the string datatype to other primitive data type. To achieve, i used Template . But i getting error and couldn't resolve the issue and error reported is also clueless.
I'm a C / assembler programmer so am not use to C++, which I need to use. Basically I'm using my own versions of memcpy, but for long and int rather than char. It's for fast graphics. So I have a char array which I copy to another array. But I copy as either longs or ints, much faster. for example
I have perl/tk installed and working. I tried using c++/tk and had to change the #include path in the headers to find the tk.h and tcl.h. I tried compiling a simple c++ program with g++ to test that the headers are correct. the line i type at console is:
g++ test.c cpptk.cc cpptkbase.cc -o test.bin
I fixed all previous errors, except for the following.
it's been a while since I logged on here! I've been trying my hand at a little perl and have hit a brick wall.I'm using the Imagemagick module to manipulate some images. I can get the following to work without issue:
I'm reading "OReilly Learning Perl 5th Edition", and there are such words:Code:You can use an array element like $fred in every place? where you could use any other scalavariable like $fred.At the bottom of the page, it explains the ? like this:Code:The most notable exception is that the control variable of a foreach loop, which you?ll see later in this chapter, must be a simple scalar.Since Perl has the save-and-restore mechanism for the control variable, why an array element can't be used as the control variable
In my system around 73gb(pc-desktop) i have,1 primary partition(windows)-25gb, 1-extended partition(remaining gb) 3 logical partitions were there in (under) extended partition in one of the logical partition is d:drive. in my hard disk d: drive is -/dev/sda5
previosly i was fat -file system , (d:drive-/dev/sda5), i remember i changed the d: drive(d:drive-/dev/sda5) file system to ext4file system ,with following command using terminal
After doing(changing the file system)this one ,i couldnt see the d:drive data
By doing that
1q) Did i reformatted the partition? i think the new filesystem(ext4) has no knowledge of the data that was on it when it had a FAT filesystem.
2q) How to do undo operation,i tried to change the filesystem type to fat/ntfs in terminal using command --sudo mkfs -t FAT /dev/sda5.
Result:its showing text message-'mkfs.FAT: No such file or directory'(not in single quote)
i have Ubuntu10.10 (kernel-2.6.35-22-generic) installed. struct stat StatBuff;
I have mounted a windows share folder on /mnt. When i gave any directory within /mnt/ to stat function it fails with errorno 75. perror shows "Value too large for defined data type". Example 1 is fail but Example 2 works fine.
I have included fstream in my file (#include <fstream>) In the file, I have a class declaration and a private variable static fstream fileStopWatch; Then I am getting the error "'fstream' does not name a type" It was working in gcc version 4.1.2 20080704 (Red Hat 4.1.2-48) but not working in gcc version 4.4.4 (GCC)
I changed my post because I found that solution, and didn't want to bother for that. But, since I didnt find a way to delete the post, I thought of updating it: I am beginning to write the code for the philosophers problem. As you know, they can eat, think or wait for forks. When they have 2 forks, one by each side, they eat. Then they set the 2 forks as available, and think.
Each philosopher is a thread. My problem is that it gives segmentation fault, somehow, when I try to initialize. The thing I really don't understand, is why it sometimes gives segmentation fault on initialization #0!!! (But generally on initialization #1) I have set 5 initializations in total, defined by N, that is also the number of threads I'm working on.
I declared a variable as int data type which was a placeholder for a resulttatus (meaning, based on the result status that variable varies from 0/1/2/3. It can contain only these four values).data type is 4 byte integer in C#. But I can declare this variable as which represents a 1 byte integer. Since that variable contains only 1 or 2 or 3 or 4, declaring the variable asis wastage of memory space.Before declaring any variable we need to just think of the memory space needed for that variable, our requirement,
I have a C header file which have arrays of predefined(known) structure type. But i dont have names of arrays and their size. when i include that file and compile my application, i want to know the names and sizesof those arrays.
purpose of application is to get the content of those arrays and to explain it in descriptive words instead of hex numbers.ofcourse this can be done by file pointers and reading also with out header file inclusion, but as i am working in C, once compiled, those variables are in my address space in i include header file.
I am doing the DNS configuration for the first time. Error in named configuration:
zone localdomain/IN: loaded serial 42 zone localhost/IN: loaded serial 42 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700 file1:9: unknown RR type 'example.com.' file1:11: unknown RR type 'red.exmple.com.' zone example.com/IN: loading master file file1: unknown class/type [Code]....
I am trying to learn how to use true type fonts in SDL using libsdl-ttf. I am trying to use the font "FreeSans.ttf" but my program prints out the message "Couldn't open FreeSans.ttf." Any way to get a list of what fonts true type fonts exist using C++ and SDL?
ubuntu terminal mingling made me want to learn programming, i started with python, using idle workspace (is this the right term?)i got to the stage when i need and want to use SPE workspace.i have downloaded it, but can't type in it - when i type, nothing happens at all.where have i been wrong please ?
in c/c++, double is usually 8 bytes. It has a 52-bit mantissa (or significand, or base), an 11-bit exponent, and a 1-bit sign. My question is: is the mantissa a 52-bit integer? Or is the decimal point just after the first bit. Meaning: if the mantissa was 1000110011100011 (in binary) would that make the value of the mantissa (assuming the exponent was 0) 1000110011100011, or 1.000110011100011? (in binary)