49,761 Topics

Member Avatar for
Member Avatar for hegde1997

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++ …

Member Avatar for hkdani
0
275
Member Avatar for xocpnytsirhc

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 …

Member Avatar for xocpnytsirhc
0
178
Member Avatar for stereomatching

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 …

Member Avatar for stereomatching
0
1K
Member Avatar for bops

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 …

Member Avatar for swagatata
0
4K
Member Avatar for MARKGELZO21

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 ...:)

Member Avatar for Ancient Dragon
0
26
Member Avatar for mrnobody

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 …

Member Avatar for Ancient Dragon
0
93
Member Avatar for Coder_Pranav

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 …

0
67
Member Avatar for ronster342000

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 …

Member Avatar for MonsieurPointer
0
243
Member Avatar for fatzky_04

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] …

Member Avatar for stereomatching
0
92
Member Avatar for Zssffssz

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?

Member Avatar for pseudorandom21
0
100
Member Avatar for fatzky_04

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 …

Member Avatar for coolbeanbob
0
130
Member Avatar for karmstrong

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. …

Member Avatar for karmstrong
0
171
Member Avatar for karmstrong

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 …

Member Avatar for karmstrong
0
127
Member Avatar for jvicta

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 …

Member Avatar for NathanOliver
0
311
Member Avatar for someidiot

[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; …

Member Avatar for mebob
0
170
Member Avatar for TheNNS

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 …

Member Avatar for TheNNS
0
3K
Member Avatar for trantran

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 …

Member Avatar for trantran
0
475
Member Avatar for vishwanath.m

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

Member Avatar for Narue
0
148
Member Avatar for CrazyMisho

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;}; …

Member Avatar for Chilton
0
142
Member Avatar for johnnyboyslim
Member Avatar for Chilton
0
61
Member Avatar for BoBok2002

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 …

Member Avatar for BoBok2002
0
133
Member Avatar for edbtzy

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 …

Member Avatar for gerard4143
0
190
Member Avatar for HASHMI007

[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 …

Member Avatar for HASHMI007
0
176
Member Avatar for meme dreame

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 …

Member Avatar for meme dreame
0
107
Member Avatar for f4fjks

[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..

Member Avatar for WaltP
0
165
Member Avatar for UNDER-18 FG

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 …

Member Avatar for Fbody
0
171
Member Avatar for glut

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 :)

Member Avatar for Moschops
0
217
Member Avatar for toneranger

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 …

Member Avatar for MonsieurPointer
0
239
Member Avatar for UNDER-18 FG

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 …

Member Avatar for hiddepolen
0
379
Member Avatar for senergy

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 …

Member Avatar for senergy
0
4K

The End.