49,761 Topics
| |
Hey, I'm studying c++ programming at university at the moment. We've recently moved onto arrays - which I understand mostly. I have no problem displaying information from an already set array, e.g. [CODE]int storage[5] = {1,2,3,4,5};[/CODE] However, I'm having problems when adding my own data to an array within the … | |
Hello Daniweb, This is my first official "help" thread. I'm currently attempting to read a file that has the following code: [CODE]8 split 1 9 1 spare 7 2 10 strike 8 2 spare 6 split 2 7 3 spare 10 strike 10 strike 10 turkey 8 1[/CODE] and have … | |
Hello all; I'm new to this list & C++. I am looking for a windows XP compatible editor (free is best). I tried to download Borlands C++ 5.5 but unable to get the email that is supposed to come (I see others have had the same problems). I'm just trying … | |
I'm working on a project in dev-C++ #include<iostream> #include "Critter.h" #include <time.h> #include<string> using namespace std; size_t strftime(char* ptr, size_t maxsize, const char* format, const struct tm* timeptr); int main() { Critter GetOne; Critter c1; c1 = Critter(0, 1, 2, 3); time_t rawtime; struct tm * timeinfo; char buffer [80]; … | |
any idea how to cunt a pointer, i did some thing like that but doesn't worked ( for (i = 1; i<currentNode; i++)) i've got an error ( comparison between pointer and integer). so any idae how to solve this problem. | |
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 … | |
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 … | |
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? … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) << … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … |
The End.