49,761 Topics
| |
hello there it my first thread on this forum. well i need some help. See i am thinking abt making my own video player not for any project kinda thing but for my wish and knowledge. I am good in C and java, with help of C i learnt c++ … | |
hi, i'm trying to make a simple program to calculate the area and perimeter of a circle, but there's a little problem, whenever i enter a floating point number as the radius, like say 2.5 it calculates as if i entered only 2(without the .5) ( i hope that makes … | |
I have to learn how to deal with socket programming because of my job(I don't have any experience about it) My company ask me to learn ACE because I have to maintain our ex and new products After I google the information from the internet, most of the users say … | |
This is not a question about C/C++ as such, but I couldn't think of where else to put it. I would like to know how to call either gcc or g++ and specifying that all error messages that are to occur when compiling some source code are to be written … | |
Can please help me how to use srand in c++ an how to generate infinite character please please... Help me to figure it out tnx ...:) | |
Hi Guys, I have a database table where the field is type integer. In my program, i use [CODE]bstrTemp = static_cast< BSTR >(_myClass.m_QueryCommand.GetValue( 1 ) // using OLEDB consumer[/CODE] the variable "bstrTemp" is type CComBSTR. Lets say after retrieving the date from database, the value is 56(integer). When I execute … | |
This is a famous Indian game called Hollywood-Bollywood. The rules are............ Create a program for the famous Hollywood bollywood game which will input the number of players and player names initially, Then it will ask for a movie to be entered by player (x+1) which will be solved by player … | |
I am writing a program that reads customer info from a file, then reads transactions from another. I am building my ADTs for this as I cannot use templates for this class yet and have a cpl of issues. The linked list contains the clientID as an int and a … | |
Hello all! I don't know what is wrong with my program. I know i'm missing something but still i can't figure it out. #define TRUE 1 #define FALSE 0 int search2Darray(int x) { int i, j; for (i =0; i< 2; i++) for (j=0; j < 10; j++) if (a[i] … | |
Ok I'm working with a program that uses addresses and with all of the Interesting charecters (. / \ and spaces) I need tO get a line of characters. I know how to do this with ifstream but how would I do this with plain old cin? | |
Hi. I didn't declare a,b,c from the first program but i did after the first program. What am i missing? [CODE] #define m 2 #define n 2 void matrixaddition() { int i,j; for (i=0; i<m; i++) for (j=0; j<n; j++) c[i] [j] = a[i] [j] + b[i] [j]; } #include … | |
Please see that attached code. My output is as follows Please enter name : dog 0x7fff71771e60 Please Enter Type: Valid Choses Are (Game, Word, Compiler, Spreadsheet, DBase, Presentation : Game 0x7fff71771e60 Please Enter Cost: $ 20 Its like either the pointer or the getline is not clearing out memory properly. … | |
I need to write a function that will use the delete command on a pointer. I'm in left field. See what I have so far any suggestions. I don't think I'm quite getting what I need to pass to the function and pass back. #include <iostream> #include "cdrom.h" using namespace … | |
| Can anybody tell me how to fix this...i've tried many ways but it still ends up the same...??? [CODE]//Ch7AppE03JV.cpp //displays an employee's name when the employee's ID is entered //Created/revised by Justin Victa on October 14, 2011 #include <iostream> #include <string> using std::cout; using std::cin; using std::endl; using std::string; int … |
[CODE]#include<iostream> #include<fstream> #include<string> using namespace std; #define months 12 #define temps 2 void getData(int [months][temps],int,ifstream); void testcout(int [months][temps],int); int main() {int y=0; string skipwrd; int mainArray [months][temps]; ifstream in_data; ofstream out_data; in_data.open ("C:\\Users\\Worker\\Desktop\\Ch09_Ex09Data.txt"); getline(in_data, skipwrd); getline(in_data, skipwrd); in_data>>skipwrd; getData(mainArray,y,in_data); y++; getData(mainArray,y,in_data); } void getData(int locArray[months][temps],int x, ifstream locin_data) {int z=0; … | |
This is a somewhat big project for me as I'm not very experienced in c++. The end goal is to read a text file, and read every word in the text file. Each time a new word is read, store it in a vector. If a word is repeated, keep … | |
I am reading Exceptional C++ (Herb Sutter) and there is something that I don't get at all concerning vector insertion. On page 59 it says: 1) "multi-elements inserts ("iterator range" inserts) are never strongly exception-safe" 2) "for vector<T>.... inserts and erases (whether single- or multi-elements) are strongly exception-save as long … | |
hey guys i just get time limit exceeded error wen ever i submit a pgm wid large values.. how to avoid it. do not use file to store variables | |
ok i try to write a linked list of objects from one class here is the the class: [CODE] class detail{ int code; string unit; string name; float price; public: detail(int c, string u, string n, float p); int get_code(){return code;}; string get_unit(){return unit;}; string get_name(){return name;}; float get_price(){return price;}; … | |
void Sort(string [][2],int,char direction='A'); What does the char direction = 'A' mean? | |
I drew a circle to represent a human face. I am drawing an arc to represent the mouth but I am having troubling positioning it in the right place. I have checked the value of x and y in the computation of the arc but can't seem to figure out … | |
I am trying to create a client to connect to a mysql database using sockets. I have the following code but of course, its not working to my advantage. Right now, this code connects to a server file located on a linux machine...i havent coded it yet to connect to … | |
| [QUOTE]Que.h Header file [/QUOTE] [CODE]template < class T> class Que{ public : Que(); Que(int max); ~Que(); int isFull()const ; int isEmpty()const ; void Insert( T newItem); void Remove(T & item); private : int front , rear; int maxQue; int count ; T * Items; // Dynamic Arry Implementation }; template … |
hey guy's iam a biggner at data structure n there z a program i did it bt everytime i run it doesn't work with me and i dono what is the wrong on it can somebody help me plz [CODE]#include <iostream> #include <string> using namespace std; class student_grades{ private: string … | |
[CODE]#include<stdio.h> #include<graphics.h> #include<stdlib.h> #include<conio.h> void main() { int graphdriver=DETECT,graphmode; int color,n,m; initgraph(&graphdriver,&graphmode,"C:\\TC\\BGI"); for(n=0;n<10;n++) { putpixel(250+n,350,BLUE); } for(m=0;m<10;m++) { int x=getpixel(250+m,350); printf("%d",x); } getch(); }[/CODE] please any one help me solving errors.. | |
Hi! I have another assignment regarding writing a program based on a given output. Here's the Output given: Output: Enter your date of birth: Day: Month: Year: My birth date is on 31 August 1980. So, here's my answer( Although it is wrong; with about 6 ERRORS in it): [CODE]#include … | |
Hey, I need to make a function that returns an array. How would I do so? And how would I make a variable that gets all the values in that function? Thanks, you guys :) | |
Hi everyone, When I try the code below with data in a txt file, I have no problems and the data prints properly and neatly on the screen. (Note, one slight modification when using a txt file, instead of getline (ist, ignored, ','), I do getline (ist, ignored, '/t') to … | |
Hi! I have another assignment regarding writing a program based on a given output. Here's the Output given: Output: Enter your date of birth: Day: Month: Year: My birth date is on 31 August 1980. So, here's my answer( Although it is wrong; with about 6 ERRORS in it): [CODE]#include … | |
Hi, how can I read specific data from file? let's say I have file containing this: [code]Data1: 1 Data2: 2 Data3: 3 Data4: 4[/code] how can I make program find "Data1: " and then get everything what's behind it? or like in some configs, there is: [code]<Something: "something2", "something3">[/code] how … |
The End.