257 Posted Topics
Re: Hi, try using [strerror](http://www.cplusplus.com/reference/clibrary/cstring/strerror/) to get some more details as to why you're fopen() seems to fail. | |
Re: > so far i have derive the algo and the pixels...but i don't know how to draw a line between those pixels Hi, OpenGL doesn't directly deal with pixel space. What i mean to say is, the API doesn't have functions to directly draw a line between two pixels. However, … | |
| |
Re: Oops, sorry, I posted wrong. @Admins: Please delete this post | |
Re: [Click Here](http://www.daniweb.com/software-development/cpp/threads/78223/read-this-before-posting-a-question) | |
Re: Use of goto is not advised. Have a look at the "Criticism and decline" section on the below link. [url]http://en.wikipedia.org/wiki/Goto[/url] | |
Hello All! To check for return values from a function and setting error flags, i am currently using the following approach: bool fine = true; fine &= func1(); fine &= func2(); .. and so on. if (!fine) { // error } Could anyone please let me know if there is … | |
Re: Do you need to make a GUI for that? take a look at this: [Qt](http://qt.nokia.com/products/) | |
Re: @OP: How about using [sscanf()](http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/)? you can trying something like `sscanf(buffer, "%d:%d", &a, &b); // where buffer is your string` So, you can check the return value of sscanf(). If it returns 2, then it means your string had the necessary pattern. So, you can directly parse and read pattern … | |
Re: Post whatever you have tried. **Here is a hint**: you can use linear search.[but that would return the first occurance of your character though]. So, if your string is joohn, then 'o' would still return 1. | |
Hi all! This is w.r.t the thread [How to make my C++ program executable on other computers](http://www.daniweb.com/software-development/cpp/threads/431194/how-to-make-my-c-program-executable-on-other-computers) I didn't want to continue the discussion there, so i created the new thread. I had faced the same problems in the past. I needed some clarification on the following: 1)`The option shown … | |
Re: > But I had no success. I get a bunch of errors and warnings Could you post them here? | |
Re: I'm not sure i follow you completely. Do you want to use a game engine[that maybe provides an editor of some sort] to create a game? OR Do you want to see the internals of the game engine? Anyway, here is a list of game engines. Some seem to have … | |
Hello All! Well this is not exactly a C++ question. Please let me know if this needs to be posted elsewhere. So, here it goes: I have a project, cosisting of the entire buildrules in Makefiles. This has been built only on Linux. Now, i need to build it on … | |
Hello All! I am a little confused about the memory allocated for an executable. Now, say for example, this is my code: int foo = 1; int main() { const char* bar = "hello world"; int num; return 0; } Now, the "hello world" part would be stored in the … | |
Hello All! I was just wondering if C++ classes could internally be represented in the following way: #include <stdio.h> struct A { int a; void (*ptr) (A *); }; void display(A *ptr) { ptr->a = 2; printf("ptr->a = %d", ptr->a); } int main() { A obj; obj.ptr = display; obj.ptr(&obj); … | |
Re: Hi, If i understand you correctly, this is what you want: You want to scale an object based on the mouse drag. i.e if the mouse is moved away from the object, you scale it more, and when you move closer to it, scale it less. Is that what you … | |
Re: > I am trying to create a MS word file using c programming I'm not sure i understand your question. Do you want to create a text editor? and one that runns on an embedded device? | |
Re: > I want to make use of pointers, I am new to C so don't know how to go about it Have you read about pointers? If not, get a good book, read about it. The forum lists a lot of good books on C. In case you still have … | |
Re: Can you please elaborate what the problem is? I am able to get squares one on top of the other. I have attached a screenshot, and i don't see the black screen you're referring to. | |
Re: @OP Objects are generally specified in a **Local Coordinate System**. The ModelView Matrix transforms the objects into the **World Coordinate System**. This link maybe helpful to you: [Link](http://www.opengl.org/wiki/Vertex_Transformation) | |
Hello. i was trying to solve this problem: [B]You’re given an array containing both positive and negative integers and required to find the subarray with the largest sum (O(N)). Write a routine in C for the above. [/B] i was able to find the largest sum. However,i had little trouble … | |
Hello, I'm trying to use the compiler optimizations for GCC 4.3.3. I used the following [URL="http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html"]LINK[/URL]as a reference. I'm mainly using the O2 and Os levels of optimizations. Could anyone please let me know if the order in which the options matters? Thanks in advance! | |
Re: You mean an application that includes all 3D functions? You would need a 3D graphics API like OpenGL or DirectX. There are several APIs built over these(at least over OpenGL) that simplifies a lot of things. For eg: OpenSceneGraph. So, you would basically need a good 3D API. | |
Hello! I have a sample application. I just put a breakpoint at the beginning of main(). The callstack pointed to a function called mainCRTStartup() and before that, the kernel32.dll was present(grayed out). Can anyone please tell me what these functions are, and who invokes them? Thanks in advance! | |
Re: You seem to be missing the main() function. Is it in another file, included in your project? | |
Hello everyone, I came across the following in a book: [CODE]Keyword typename The keyword typename was introduced to specify that the identifier that follows is a type. Consider the following example: template <class T> Class MyClass { typename T:: SubType * ptr; ... }; Here, typename is used to clarify … | |
Re: Well the first thing is to decide an API to program with. OpenGL and Direct3D are mostly used for 3D rendering, not much for 2D(although you can do it). i don't know if you there are 2D specific graphic APIs. There are loads of material available on OpenGL. 1) [URL="http://nehe.gamedev.net/"]NeHe[/URL]: … | |
Re: You can loop through [B]argc [/B]and read values stored in argv[]. [CODE]for (i = 1 to argc) { read file argv[i] }[/CODE] You could do something like that. [URL="http://www.crasseux.com/books/ctutorial/argc-and-argv.html"]argc, argv[/URL] | |
Re: Are you sure [B]SOIL_load_OGL_texture()[/B] is returning successfully? Also, have you specified the correct texture coordinates while drawing the shapes? [QUOTE]] but I still can't get the image to upload.[/I] [/QUOTE] Could you take a screenshot of the output and post it here? |
The End.