49,755 Topics
| |
Does anyone know of a good DirectInput tutorial? Every one I've found adds all kinds of extra stuff into it, and all it gives me are lines of code without explaining the well, or showing me how to fit them all together. | |
#include<iostream> using namespace std; int main() { char name; cout<<"Enter your name.\n"; cin >> name; cin.get(); cout<<"Hello, " << name; cin.get(); } this is what I have.. Very simple program but I cannot get it to work, as soon as I enter two or more letters when debugging, the cmd … | |
Dear all, There is some errors in the code that I can’t seem to spot. The code is [CODE]# include <iostream> using namespace std; int main () { int N; // Declaring and initializing variables int n=0; int i=0; int fact=1; cout << "Please Enter an Integer" << endl; // … | |
Hi all, I have a library built in C++ targeted for linux platform. The authors suggested that with some minor changes, it can be compiled in windows as well.. This library in turn uses the mathematical library called miracl, which does support VC++ and I was also able to build … | |
Hi, Im new to DaniWeb and C++ and was hoping some of you more experienced tech fellas could help me out with a problem. I want to open a file, then read it by 5 characters at a time by putting it into a [CODE]char[5][/CODE] type of array, then analyze … | |
> THe program works - its is the last piece of code I am having trouble with. I am supposed the wirte and function (month_conversion) which changes the int month that is represented in the input by (montnNumber and monthNumber1 input that number which represents the month and conver that … | |
I've attached some .h and .cpp files so that you can view the code I am having trouble with. Basically the following errors are being thrown: Error 2 error C2059: syntax error : '{' c:\users\simon\documents\visual studio 2008\projects\objects\sprite.h 19 objects Error 3 error C2334: unexpected token(s) preceding '{'; skipping apparent function … | |
Hi all, My first post here -- I've been trying to update some old code that uses C-style casts into the C++ equivalent, and I've stumbled on one cast that I can't figure out how to convert. This isn't the code that was giving me issues, but it reproduces the … | |
First look at attached picture. As you can see there is few check boxes. I would like when I click Install it run selected components (mostly .exe or .bat file) If I'm sure I need to add some code to event handler of Install button? Now in event handler there … | |
I am trying to optimize my hash function, for a separate chaining hash table that I have created from scratch. My hash function is as follows: [CODE] int hash( const string &key, int tableSize) { int hashVal = 0; for(int i = 0; i<key.length(); i++) hashVal = 37*hashVal+key[i]; hashVal %= … | |
So I would like to know if there's any way to do the following more efficiently: [CODE]while(g[0] = 0 || g[0] = 1 || g[0] = 2 || g[0] = 3 || g[0] = 4 || g[0] = 5 || g[0] = 6 || g[0] = 7 || g[0] = … | |
how can i make a program that the computer will allow the usser to input a number.. then it will turn into a word? example: 1030=one thousand thirty | |
Hey all, writing up some code to copy a string from a text file and extract numbers from the string. What I have so far is: [CODE]#include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]){ ifstream in("test.txt"); if(!in){ cout << "Cannot open file."; exit (1); } char … | |
Hi, I am trying to learn C++, and to a certain extent, yeah, it's going alright so far. but I keep getting problems with header files and the like, so I would be really grateful if you guys could help me out. 1) Can't: #include "stdafx.h" - fatal error:file or … | |
OK, so i need help adding my total_points = temp1 + temp2 + temp3, but everytime they just equal 0. This is a student grade class average program, where you enter a student's info, it gets calculated, then you add the next, after entering all studen't you have to figure … | |
Hello; read this quastion , what do the last part mean ? do they mean to print the remine cookies that have to be produced to let the number be complated ! or to print the number of cookies that we throw ! -------------------------------------- [B][U]the quastion is :[/U][/B] A box … | |
hello can any one please write code in simple language tht how to find vowel from string Thanks | |
[B]i hav a task to make a program,,the program is like this make a video rental system. instead of putting a struct use a importing and provide documentation for the video rentalsystem .Aside from this code provide explanation about this program & how to use it..pls can u help me..[/B] | |
Hi guys, I'm trying to solve this interview question: "Write a function which, given n, prints all well-ordered integers of n digits. A well ordered number is one where the value of the i-th digit is less than the value of the i+1 digit." I've written the code where if … | |
I would like to automatize for example Java Installer to install Java without any additional user input. When I run Java Installer.exe I see following picture (attached, 100.png) I would like my program (whatever, console or something else - I don't know what) to automatically press Install button and bring … | |
I'm writing a pennies game in which a player and the computer take coins from a pile until only one remains. The trouble is I keep getting an error saying "warning C4700: uninitialized local variable 'nuCoins' used" though I thought after the user input a value it would be. Any … | |
[code=c] #include<iostream.h> #include<conio.h> #include<string.h> void main() { char s1[30],d[30]; int l; clrscr(); cout<<"Enter your name: \n"; cin>>s1; cout<<s1<<endl; l=strlen(s1); cout<<l; d=strupr(s1); cout<<d; getch(); } [/code] When i run this code , it shows Lvalue required error please help | |
in openGL how can I make the left of the screen = 0 and the right to = 10 or somthing, and the top = 0 and the bottom = -10. because i dont like working with numbers only ranging from -1.0 to 1.0. i read [URL="http://www.opengl.org/resources/faq/technical/transformations.htm"]here[/URL] that the coordinate … | |
Hi all, I am not sure whether the member variables of singleton class should be protected for multhread since I just read some code from colleague. I think it should be. | |
DNS_STATUSWINAPIDnsQuery_W( IN PCWSTR pszName, IN WORD wType, IN DWORD Options, IN PIP4_ARRAY aipServers OPTIONAL, IN OUT PDNS_RECORD * ppQueryResults OPTIONAL, IN OUT PVOID * pReserved OPTIONAL );In the Options what is the difference between DNS_QUERY_BYPASS_CACHE and DNS_QUERY_STANDARD? please explain me clearly | |
Im nothing special, im just here for if I need help as I learn C++ :) Currently im at college doing construction and... Well, im not really sure its for me. I can do it well, Drawing, QSing.. All of it. I just dont have any real intrest anymore. So, … | |
Can i use borland c++ 5.5 to design graphic programs? if yes, please reference a book that i can use(ebook please). | |
Hello, I am looking for some help with a program i am writing. It is supposed to ask you for the name of an object and the 'create' said object. It ends with an error message saying that the hard drive was wiped. The only problem is that i can't … | |
Having trouble finishing the if else statment. Help would be so greatly appreciated. Do i need more const? Just confused all and any information is apprieciated Input if home use, commercial use, or industrial use Clear screen IF (home use) $5.00 plus 0.0005 per gallon used else if (commercial use) … | |
Hi, I was wondering if anyone could help me figure out how to see who is connected to you when you are hosting a game on a specific port via c++. I know you can use netstat in cmd prompt and it shows a bunch of info of who you … |
The End.