49,757 Topics

Member Avatar for
Member Avatar for cole davidson

Hi guys. I am trying to write a program that asks the user how many test scores they have, then reads the test scores, averages them, then displays the average and a pass/fail grade (50+ is a pass), using a seperate function to average the input values. I have been …

Member Avatar for cole davidson
0
610
Member Avatar for William Hemsworth

Here's a function that manually converts an integer to any base between 2 and 36, the parameter list is: [CODE]void toBase( int value, // Integer value to convert char *target, // Pointer to a large enough buffer int base, // Base (from 2 to 36) int fixedDigitCount // The minimum …

Member Avatar for William Hemsworth
0
209
Member Avatar for BenJammin89

simple little program from a book. One of the exercises is to modify it to use displayMessage to output the "Welcome" message and the name of the Professor. Problem is everytime I do it the name of the Course and the professor are the same. What am I doing wrong? …

Member Avatar for BenJammin89
0
79
Member Avatar for tech291083

Hi, I was wondering if it is possible to connect a C++ program to a MySQL database on Linux Fedroa Core 5 os. It would be great if I could create a program in C++ that allows me to create a completely new database in MySQL, edit, modify, delete and …

Member Avatar for mikejonesey
-1
317
Member Avatar for sartori

Not sure this is the best place to post this: I'm an experienced C++ oop developer wanting to develop my own semi-complex website ( e.g. with very nice GUI and graphics in general). I've used Qt for C++ GUIs I'm a newbie to web development, and after researching languages, it …

Member Avatar for network18
0
75
Member Avatar for mehmood_ahmed

hi ... i am making a program which can handle bank acount system. In which User can MakeDeposite,WithDraw money and CheckRemainingBalance. when user MakeDeposite then a certain amount should be saved and as how much times user MakeDeposit, it should be added in balance amount and as how many times …

Member Avatar for mehmood_ahmed
0
76
Member Avatar for ejam

To write a program that reads a person name in the following format: first name then middle name or initial, and then last name. the program then output the name in the following format: Last_name, First_name , Middle initial. Example the input [B]Mary Average User[/B] should produce output [B]User, Mary …

Member Avatar for mrnutty
0
42
Member Avatar for yatman

Hi, I am writing a program which needs to extract data from a file. Sample file Adder: 4, yes Mult: 6,yes .... i want to extract this info into a structure { Int interval (4 should be entered here) bool pipeline (if yes then 1 else 0) } i read …

Member Avatar for Ancient Dragon
0
78
Member Avatar for UKmason

This is what I have of my code so far but I cant get it to work right, Can someone help me fix this I need to make a float function that converts celsius to fahrenheit but im not totally sure how to do it I also need to make …

Member Avatar for restrictment
0
131
Member Avatar for pokerDemon

Ok so heres my story. Ive done basic programming before with serverside javascript which is not really used but effective when creating small backend databases and its kinda like vb script, so im familiar with basic concepts like funtions, arrays etc Ive been reading some books on C++ and ive …

Member Avatar for jbennet
0
106
Member Avatar for restrictment

Hey, I am just learning functions. I was wondering if you could tell me why this piece of code is not implementing the 'values' function. [code] #include <iostream> #include <windows.h> #include <string> #include <iomanip> void values(float value1[11]); using namespace std; float value1[11], value2[11]; int main() { cout << setiosflags(ios::fixed) << …

Member Avatar for restrictment
0
124
Member Avatar for wkaifiti

template <class T> bool linkedlist_2d<T>::get_data(int row, int col, T & data){ bool bsuccess; //to do the missing implemetation return bsuccess; } //this code is part of other linked_list_2d template <class T> bool linkedlist_2d<T>::update_data(int row, int col, const T data){ bool bsuccess; //to do the missing implemetation return bsuccess; } template …

Member Avatar for kesh1000
0
88
Member Avatar for UKmason

This is what I have already but I dont know if I am meeting the specs for my assingment... anyone have any input of what I should do? Assignment is Write a program that will ask the user for a temperature in Centigrade (Celsius) and convert it to the Fahrenheit …

Member Avatar for BeyondTheEye
0
435
Member Avatar for restrictment

Just testing out arrays on this one. MY project is to create a thermometer that converts Celsius to Fahrenheit or vice-versa. [code] #include <iostream> #include <windows.h> #include <string> #include <iomanip> using namespace std; int main() { cout << setiosflags(ios::fixed) << setprecision(2) << ios::showpoint; float value1[11], value2[11]; char gauge1, gauge2, gauge; …

Member Avatar for restrictment
0
207
Member Avatar for gcardonav

Afternoon: I am trying to create a loop to give me a series of random numbers. I need the random numbers to be between 100 and 999, this is necessary so I can divide the numbers by 1000 and then use this numbers for another program. My problem is that …

Member Avatar for mrnutty
0
157
Member Avatar for Carrots

Hi there, I was hoping for some advice on how best to solve my problem. I'm creating a .csv file to store objects in, but the datamembers which are strings, require the ability to have commas within the strings. I have found out that I therefore need to enclose the …

Member Avatar for Carrots
0
5K
Member Avatar for neithan

I'm learning C, but a friend of mine asked for help with this code. I have debugged it with C::B and actually it crashes when getting out of the switch and starting to print out the menu again, after selection the first option (1. Polinomio) I 'watched' the polinomio pointer …

Member Avatar for Dave Sinkula
0
125
Member Avatar for leowdeo

i am trying to create a simple class to simply create an imagelist which i will later on use in a toolbar class. The problem is that the empty Add() member function has an error error: request for member `Add' in `myImageList', which is of non-class type `CImageList ()()' i …

0
82
Member Avatar for slim2hott

Im creating a calculator in a dialog box I have created all my headers and resource files with all my buttons and edits ready. This is a part of my .rc file: [CODE]EDITTEXT IDC_NUMBER,3,7,100,14,ES_NUMBER EDITTEXT IDC_NUMBER2,130,7,100,14,ES_NUMBER[/CODE] I have made these so the user can input integers and then use them …

Member Avatar for slim2hott
0
196
Member Avatar for Tales

Hello, I wanted to ask about a new small program that ihave to do. I am supposed to take some information from an excel (the structure of this excel is fixed) and save it as an XML. I am still deciding if I should do it with Visual C++ (which …

0
63
Member Avatar for kent01981

VC++ access MySQL query problem Hi guys, Could you help me out with ------------ string str1 res=stmt->executeQuery("select * from test2 where english='str1'"); ------------ anyone can tell me where is wrong with this query code?below is the error msg I got: 1>.\temp6.cpp(48) : error C2146: syntax error : missing ')' before …

Member Avatar for kent01981
0
291
Member Avatar for gcardonav

Hi: I posted yesterday about setting my loop to get random number between the values I desire. Now I got a bit of misunderstanding with my arrays. In the program now I am trying to calculate the average sum of the amount of numbers I get each series. My problem …

Member Avatar for Ancient Dragon
0
183
Member Avatar for chaybird001

[CODE][/CODE]part 1 find the most efficient way of making change for any amount of money up to $200.00. the most efficient way means the fewer pieces of currency. the following are the values of monies to use. $ 100.00 $1.00 $ 50.00 $.50 $20.00 $.25 $10.00 $.10 $5.00 $.05 $2.00 …

Member Avatar for Ancient Dragon
0
151
Member Avatar for miskeen

Hi guys, Can I enable/disable an #ifdef based on a specific condition? Let's say that I've a loop [CODE]#define MYCONDITION 1 // code here for (int i=0; i<5; ++i) { printf("Hello #%d", i); #if MYCONDITION printf("I wanna be reached only if i == 3, is that possible?"); #endif }[/CODE] Is …

Member Avatar for miskeen
0
105
Member Avatar for cole davidson

Hey! I just started learning C++ last month, so I am not that good yet. I am trying to write functions to compute the total surface area, lateral surface area, and volume of a right-circular cylinder. So I wrote the code, and it makes perfect sense to me. When I …

Member Avatar for cole davidson
0
2K
Member Avatar for trahrey

Hi, I have a question on writing a c++ program can anyone give me a hand?

Member Avatar for sneekula
-5
227
Member Avatar for caprio.nups

this code is not working as per its expected output.please tell me the errors and how to rectify them. [CODE] #include<iostream.h> #include<stdlib.h> #include<conio.h> int* getwaitingtime(int* proc,int* arr,int* bur,int noofproc) { int i,j,c[10],t,p,m,s[10],out[10],f,l; int *wait; for(i=0;i<noofproc;i++) { if((arr[0]!=0)||(arr[i]>arr[i+1])||(arr[i]==arr[i+1])||(bur[i]<0)||(bur[i]==0)||(bur[i]>10)) { return NULL; } } for(i=0;i<noofproc;i++) { c[i]=arr[i]+bur[i]; } for(i=1;i<noofproc;i++) { for(j=1;j<noofproc;j++) { …

Member Avatar for caprio.nups
0
115
Member Avatar for necrolin

My C++ course hasn't covered a topic yet, but I'm expected to solve a few problems with this material. I've got some working code I just don't fully understand it. Can someone help me, please? [CODE] void f(int** a) //What is this ** business? (1) { cout << **a; //prints …

Member Avatar for dkalita
0
88
Member Avatar for Tajna

hello ! I`m trying to use sqlite database with c++, but something isnt working right... The problem I`m dealing here is that i cant insert other datas into the table i`ve created except NULL, because i get following error message: Error in select statement : INSERT INTO a (a,b,c,d) VALUES …

Member Avatar for Tajna
0
100
Member Avatar for restrictment

The question is in the title. I am trying to make an image that includes this character... *typo in title. It should say 'do', not 'to'.*

Member Avatar for jbennet
0
853

The End.