Quantcast
Channel: User Commodore63 - Stack Overflow
Browsing all 35 articles
Browse latest View live

Comment by Commodore63 on How to set vertical text in the column headers of...

Note that this approach interferes with the column resizing behavior of the datagrid.

View Article


Comment by Commodore63 on How to set vertical text in the column headers of...

This approach allows column resizing behavior as expected. +1.

View Article


Comment by Commodore63 on How to Write a single byte to a file in C++, while...

After the write, seek to the end of the file before closing it.

View Article

Comment by Commodore63 on How do I lock the camera horizontal rotation if...

mov.speed > mov.speed is always false.

View Article

Comment by Commodore63 on C: Pointer arithmetic and malloc() - NO GO?

When you are trying to understand code like this I find it helpful to step through it in a debugger and see how each line changes variables, memory, etc, it is way better than seeing a blast of printfs...

View Article


Comment by Commodore63 on Problem in deleting blank lines in exercise 1-18 (K&R)

On page 29, K&R have an example which provides code which does a very similar function to what you are trying to do. I suggest that you start with that and understand it. Then modify it to do what...

View Article

Comment by Commodore63 on Segmentation fault while searching data in a txt...

Step through your code in a debugger and watch it execute. Second,when parsing text files performing a seek based on number of characters is bad practice. i.e. don't do this: fseek(openedfile,175,...

View Article

Comment by Commodore63 on A function to check if the word has an increasing...

Your for loop works, but is not the idiomatic way to cycle through characters of a string for(i=1; str[i]; i++) . It would be better to use for(i=1; i<strlen(str); i++)

View Article


Comment by Commodore63 on Pick user's choice on button click

what do you mean is not printed correctly. What is your print statement? What is the output? What do you mean by "I can see the right value"?

View Article


Comment by Commodore63 on Hanning Window Bandwidth

Yes, there is a connection. The bandwidth of the windows is typically referred to as the noise bandwidth, which is 1.0 for a rectangular window and 1.5 for the Hann window.

View Article

Comment by Commodore63 on InFix to PostFix function Operator don't show

If I read your if statement correctly, it only runs when expression[i] is not an operator.

View Article

Comment by Commodore63 on c++ search for a specific file (text.ini) and list...

@Andy, did you try FindFirstVolumeW() and FindNextVolumeW()?

View Article

Comment by Commodore63 on using File().byLine() with fold()

Thank you. That makes sense. I am relatively new to D and find the documentation lacking regarding templates and function literals. This cleared things up for me a lot.

View Article


Answer by Commodore63 for Opening Files for Edit

You could use the errno to get a hint as to what is going wrong:#include <stdio.h> #include <stdlib.h> #include <errno.h> /* new */int main (void) { if((cfPtr = fopen("test.dat",...

View Article

Answer by Commodore63 for Finding characters within a string in C

The information regarding how many asterisks you found is stored in the counter j. This variable gets reset in the for loop:for(j=1; j<=i; j++)Furthermore, this for loop goes all the way up to i,...

View Article


Answer by Commodore63 for Combine Rotation Axis Vectors

You should use unit quaternions rather than scaled vectors to represent your rotations. It can be shown (not by me) that any representation of rotations using three parameters will run into problems...

View Article

Answer by Commodore63 for C Programming fopen() while opening a file

You may not have permission to create/write to a file in the directory that the user chooses. You will have to handle that error condition.

View Article


Answer by Commodore63 for strncmp proper usage

I sense that you are using strncmp to prevent buffer overflow, however, the message is already copied into memory (i.e. the message buffer). Also, the prototypeint strncmp ( const char * str1, const...

View Article

Answer by Commodore63 for Using C, how can I access the same block of memory...

If you are in a unix environment you can use shmget() and shmat() to create and attach a shared memory segment. Both process assess the segment via a common integer key.

View Article

Answer by Commodore63 for Text editor with autocomplete for C/C++ and...

I recommend Eclipse. It does highlighting and code completion. On the download page choose "Eclipse IDE for C/C++ Developers."

View Article
Browsing all 35 articles
Browse latest View live


Latest Images