The first two rows of the second column are being replaced into the last two rows of the first column, now I even checked in visual studio and it works fine there. A friend tried my code and he gets it even worse:
column 1:
0,0,0,0,1,1,1,1,1,1
column 2:
1,1,1,1,1,1,1,1,1,1
As far as I've seen it must be a problem with GCC, unfortunately I need to have this up and running in GCC no matter what.
I want to add double quotation marks to contents of an column ,the column contains over 7000 cells with content already,so it would be heavy task to add "double quotation marks"one by one.Is there any way to do that quickly on Libre office?
I would like to make a file with all these data in one column, like
a1 a2 . .
[code]....
Can it be done with awk or some other command? Also, is it possible then do add another column in front of this one with numbers of the lines (for every previous column), like
i'm practicing in very basic c programs using the gcc compiler.I found that when i create two variables let's say
Code:
int a,b and Code: a=15; b=3; a=b; b--;
then a equals 2.I thought that this isn't normal in C isn't it?I haven't had the time to read the gcc documentation yet...so i think it has something to do with my compiler's default settings.I use the
Code: gcc filename.c -o filename command to compile
What is the difference between *ptr++ and (*ptr)++. In my opinion the terminology is all over the place so if you could give an example it would be better.
i'm a bit stuck playing with the following class setup for glut. The actual issue is with the function pointers.Basically the following code is the opengl redbook cube example slightly modified.
In the above example, the functions take no input arguments. Can they take a different number of arguments, for example, function_a(int), function_c(int, int), function_e(int, char, int)? How can I do that?
I want to know is there some more efficient way of passing a pointer to a local variable as a parameter to a function in x86 asm? Right now I have to move the base pointer to a temp register, subtract from the register and pass that, like this (assuming a local var at esp-4):
Code: mov eax, ebp sub eax, 4 push eax Is there a better way?
I'm trying to figure out how to code for this specific type of instance - I want to use a hash and have the key be a reference to an array, and not use the key in the standard way of it being a scalar. Basically, I have a large output that I need to process line by line, and rather have access to it as an array than a big block in a scalar. For the big block hash as a scalar I would do -
How would I code it that I would have access to the key information as an array and not a scalar? I know it needs to be a pointer and we're going to have -> in there somewhere, but not sure how to approach it. Some of the documentaiton I've been reading about referencing I've found a little confusing so far, and trying to figure out how to use them in context of what I'm working on.
I am trying to find a way to pull Node Pointers out of the model, for use in other areas of the program. The solution is probably simple but I haven't had any luck finding it.
Model for a QTreeView:
Code:
class testModel : public QAbstractItemModel { public: testModel(); ~testModel();
I have the most strange problem ever in programming. I fork a process into a parent and a child. In every forked process i declare a pointer, malloc and define a different value for every pointer.When i printf the value and the address guess what? They both have the SAME ADDRESS but DIFFERENT values, as assigned..Here's the portion of my code:
I'm writing a command-line flash card program in Python. I've tried many existing applications, but none fit my specialized needs.
All of the words I'd like to study are manually added to a text file (study.txt). Each time the software is loaded, it checks for new words in that file and also compares them to a dictionary (a tab-separated file, dictionary.txt), and adds that to a matrix. The flash cards are thus automatically generated from study.txt and dictionary.txt.
Now, the software must manage lots of information about each word I'd like to study and add new information made while interacting with the program (such as when that word should be studied next).
That seems easy to put into a matrix. But what is the best way to put that information in a place where I can pull it back when I run the software tomorrow? Do I need to save the matrix to a CSV file, then convert the CSV file back to a matrix the next time the application is run?
This is one of the strangest problems I've run into while programming. Maybe there's just something wrong with my version of gcc or something.
The main problem comes at this point in the code:
Code: po = makePoFromScorbotXYZPR(X, Y, Z, P, R); h = makeHB2GFromPo(po); printf("%le", *h[1][0]); //##################################### Here it has the right value printf("%s", "
As you know, in C++ you can use setfill(char c); and setwidth( int length) to fill a line of a character. It's line making a line of a character for output
Code: NAME DEPARTMENT LOCATION ========================================== Pete R&D Chicago ... ========================================== As you see, a line of a '=' character drawn to output.
I'm wondering, how can I draw this line in C using printf() to format? ( no loop or repetiton )
I have around 600 empty text files that I need to add the name of this file as part of the data, I meanfiles from "file1.txt to "file599.txt, all of them empty, and I need to get the name inside the file, so, when I open the file show the name as part the data "file1".these files were created on my web site, I am thinking in a small script in bash
In bash I need to use some equivalent of double quotes inside double quotes (or the other way around.)I need to run the following statement to get the output of foo and store it in a variable while passing foo the $file which probably contains spaces.
Code: variable=$(foo "$file") The problem is that foo might return an empty string and if it does I need to catch it