257 Posted Topics

Member Avatar for Aman6o

"Glow an LED" is too vague a description. You need to provide more details. I had worked on such boards once. There, sending a 0 bit to the LED used to glow the LED. In your case, assuming sending a 0 to an LED glows it, this is what you …

Member Avatar for myk45
0
111
Member Avatar for kingcong83

You have the following errors. 1) No [B]using namespace std[/B] or [B]std::[/B] (for cout, string etc) 2)[B] void InputData(string, int[], int &);[/B] This function seems to take a string, but you are passing a string array here: InputData(playerNameAr, scoreAr, numPlayersAr); --> Line 25 3) Line 34 -> There is a …

Member Avatar for Schol-R-LEA
0
156
Member Avatar for lo0lo0999

1) [CODE]int n = SIZE ; [/CODE] That should be just before the loop, and initialised to SIZE - 1. 2) You don't seem to change front and rear, thus the termination condition never reaches. 3) A queue is a FIFO(First In First Out) data structure. What you are doing …

Member Avatar for lo0lo0999
0
303
Member Avatar for jamal30

Try using [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fprintf/"]fprintf[/URL]. You need to start with some code. Here, we can provide help after you have made an effort. Post what you have already written(if you have) or else, read about FILE I/O in C, and if you have doubts, you can post here.

Member Avatar for ashlock
0
96
Member Avatar for Jungletoe

You need to generate a texture ID, as you have mentioned. [URL="http://www.opengl.org/sdk/docs/man/xhtml/glGenTextures.xml"]glGenTextures()[/URL] You need to specify the data for the texture. [URL="http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml"]glTexImage2D[/URL] You then need to specify the filtering technique you wish to use. [URL="http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml"]glTexParameter[if][/URL] You also need to specify the texture coordinates using glTexCoord2[df] You can look into this …

Member Avatar for myk45
0
1K
Member Avatar for BITnur

[B]count [/B]holds the count of the digits in the binary number. for eg consider 101. 111 -> count = 3. b[0] = 1 b[1] = 2 b[2] = 4 c[0] = 1 * 1 c[1] = 0 * 2 c[2] = 1 * 4 Therefore, sum = 6. PS: What …

Member Avatar for BITnur
0
236
Member Avatar for izh

Well, first up, try to read contents of the file into whatever data structure you are required to use. [URL="http://www.cplusplus.com/doc/tutorial/files/"]File I/O[/URL]

Member Avatar for izh
0
247
Member Avatar for coding101

I'm not sure if standard C has any functions that do this. [URL="LINK"]LINK[/URL] You can try to use some compiler and OS specific functions, but that would reduce portability.

Member Avatar for N1GHTS
0
97
Member Avatar for Elmey

Hi, How about this approach: Convert the array into an integer after parsing through the entire number. i.e say for eg, the number is stored as [B]123.456[/B] Now, find the integer equivalent by looping through the array, i.e obtain 123456 and then, divide it by an appropriate power of 10 …

Member Avatar for Narue
0
286
Member Avatar for theCompiler

[QUOTE]i dont have idea what string function must be used to find consecutive characters . example is the word commit it will output the letter m[/QUOTE] Your question is not clear. What do you mean to say consecutive characters? The example you gave does not explain the problem well.

Member Avatar for nHulk
0
5K
Member Avatar for zhanrah

The program seems to be fine. Except that, the variable index in line number 26 wasn't initialised to 0(but was used to index an array). It works fine after that change.

Member Avatar for Moschops
0
204
Member Avatar for ram619

This would be: [CODE]ptr->p->i = 3; So, --(ptr->p->i) = 2;[/CODE] So, a[2].z is what is being printed. Which is, "Jabalpur".

Member Avatar for ram619
0
90
Member Avatar for XodoX

Did you try [URL="http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_linklist.aspx"]this[/URL]? It is by a member of Daniweb(guess who) :) And i feel it's really good.

Member Avatar for myk45
0
52
Member Avatar for CityThrille

[QUOTE]Don't be confused... <dos.h> and <iostream.h> are libraries, part of my C++ and C Compiler. I used <dos.h> because it is required by my void printtime() subroutine. (Required for printing the system time in my program.) The <iostream.h> is used for Input-Output streaming function things. (Never mind the iostream.h, anyway. …

Member Avatar for CityThrille
0
296
Member Avatar for askerknight

Initialise low1 and low2 to a high value. Check [URL="http://www.cplusplus.com/reference/clibrary/climits/"]this[/URL] I just had them as 9999(all other numbers in the list were lesser than that.) and it works fine. Here is the [URL="http://ideone.com/gTwqQ"]working code[/URL]: PS: Kindly format code the next time you post. It will be easier to read. :)

Member Avatar for askerknight
0
146
Member Avatar for Labdabeta

Well, how does the tutorial read the vertices? While creating the display list, it would be making vertex calls right? Maybe you can open up the code that does that and check how it is done?

Member Avatar for Labdabeta
0
117
Member Avatar for myk45

Hello all, I am a little confused about .lib and .dll files. I always thought that .lib files refer to a static library and that a .dll is the dynamic library. Recently, i read that .lib files also act as a stub for a .dll and that the .lib files …

Member Avatar for myk45
0
903
Member Avatar for mprabuw

Welcome to Daniweb :) Well, you can use a string comparison function. Use strcmp() if allowed or write your own version of it. In this: [CODE]while (fscanf(prabuinputfile, "%s %s %lf %lf \n", &Try.date, &Try.curr, &Try.buying, &Try.selling) !=EOF ) { // Add if condition here. } [/CODE] So, do a string …

Member Avatar for mprabuw
0
783
Member Avatar for tyricec

[CODE] int x; // Not initialising x and y. int y; int x1; int y1; int x2; int y2; int x3; int y3; int x4; int y4; x1 = x; y1 = y; x2 = x +100; y2 = y; x3 = x; y3 = y + 75; x4 = …

Member Avatar for tyricec
0
232
Member Avatar for tomtetlaw
Member Avatar for fkrafi

Maybe use command line arguments, read a file using it? [URL="http://www.cprogramming.com/tutorial/c/lesson14.html"]LINK[/URL]

Member Avatar for WaltP
0
232
Member Avatar for bonyjohn

>> Guyz please give me some project ideas for my main project. It would be easier to provide help if you mention what interests you and on what topic you would like to do your project on.

Member Avatar for carljohn
0
227
Member Avatar for Alex Starkov

I'm not sure what you're trying to do here. In case you are trying to convert a string into an int, this would work: [CODE]l = l * 10 + (number - '0');[/CODE] So, when the loop terminates, [B]l[/B] will have the integer needed. By the way, what is [B]cislo …

Member Avatar for Alex Starkov
0
250
Member Avatar for aKiLa.. :)

@OP [QUOTE]i realised that i need to learn even more about c++ before setting out to explore the graphics..[/QUOTE] Not really. You can use C. OpenGL has bindings for several languages. Take a look at [URL="http://www.opengl.org/resources/bindings/"]THIS[/URL]

Member Avatar for Ancient Dragon
0
229
Member Avatar for logicmonster

What do you mean by [B][I]complete error checking after a user input from the keyboard[/I][/B] ? Could you give an example?

Member Avatar for abhimanipal
0
184
Member Avatar for fpm777

>>Compare 2 files helppppppp That does not tell us much about what problem you are facing. Help can be provided only when you tell us what the problem is. PS: [B]#include<iostream.h> -> #include <iostream>[/B] (why iostream anyway?) [URL="http://members.gamedev.net/sicrane/articles/iostream.html"]LINK[/URL] What compiler are you using? Also, [B]void main() -> int main(void)[/B]

Member Avatar for abhimanipal
0
112
Member Avatar for maxicube

It is because of this: [CODE]glutIdleFunc(display); [/CODE] display() is being called continuously, since you have registered it as the idle callback. The window does move. The problem is there are too many idle calls. Give some delay, that will work. PS: Its not a good idea to register the display …

Member Avatar for maxicube
0
147
Member Avatar for ira2010

Where exactly are you reading a string? [B]getc[/B] is used to get a single character. You can try using fscanf() instead, and obtain a string. i hope this helps.

Member Avatar for myk45
0
97
Member Avatar for jithuvsjithu

@Soubhik Check [URL="http://en.wikipedia.org/wiki/OpenGL"] THIS [/URL]out. Hope that helps.

Member Avatar for Soubhik
-1
179
Member Avatar for ammukj

1) To do object tracking, you can use OpenCV (an image processing library built using C++). 2) To simulate mouse events, you can go for OS specific functions. For example, on Windows, SetCursorPos() to set the cursor position in screen coordinates.

Member Avatar for myk45
0
36

The End.