49,764 Topics

Member Avatar for
Member Avatar for kalachylde

Hi all, Someone is going to laugh at me for this one. Can you have two arguments in a switch case statement? [code]switch [COLOR=Red](choiceA, choiceB)[/COLOR] { [COLOR=Red]case 1,2:[/COLOR] cout <<"Information"; break; default: break; }[/code]

Member Avatar for FireNet
1
282
Member Avatar for MaxC

Hello guys, This code returns 2 errors and I dont understand why. [CODE] #include <iostream> #include <string> using namespace std; char choice; void M(); void C(); void Process(); void M(){ cout <<"Multiplication\n"; } void C(){ cout << "Calculation\n"; } void Process(){ cout << "Make a choice\n" << "C or M …

Member Avatar for kc0arf
1
212
Member Avatar for ineedhelp2004

I am needing help on a problem I began a few days ago. It regards a temperature prblem and I am required to write a program to display and print the degrees in farenheit and centigrade. I performed the program numerous times and got these results: conversion.cpp:11: parse error before …

Member Avatar for FireNet
0
316
Member Avatar for mrprimo55

Hey I have this program that I'm having some trouble figuring out so maybe someone can give me some helpfuls hints. Here goes: I have to find all numbers between 1 to 999 who when their digits are cubed individually and then all added together, equal the original number. For …

Member Avatar for Dave Sinkula
2
147
Member Avatar for MaxC

Hello guys, is there a way to declare global variables as [B]float[/B] and then convert them to [B]int[/B] to be used in a function? i.e. [CODE] float num1, num2, result; float Mod(){ num1%num2=result; //Wrong, (%) requires [B]int[/B] type) } [/CODE]

Member Avatar for ivosetyadi
0
216
Member Avatar for kalachylde

Hello, I need help with me homework. It's probably something simple. My program is supposed: 1) read lines from a file (rain.txt) 2) find the shortest and longest lines (I used strlen()) 3) return the line number of shortest and longest and well as their length 4) show the avg …

Member Avatar for kalachylde
0
185
Member Avatar for Jo_1660

Hi, I am trying to write an engine simulation program in C++ - please not that I have never done any programming. I have attached what I have done so far which is a program that calculates the cylinder volume from a crank angle (theta). What I need now to …

Member Avatar for Jo_1660
1
157
Member Avatar for dooda man

hi , i am doing a project with c++ visual studio 6 and i really want this facility, which is .. the user will enter a single character or a an integer ,so the compiler will take the input he entered (int or char) without waiting from him to press …

Member Avatar for Bleek
0
4K
Member Avatar for eager04

ok im trying to change this from link list to a queue.bt whenever i run it it sill shows from last to first which is the opposite from what i want.here it is, i hope somebody can try to see whats wrong with it. #include<iostream.h> #include<conio.h> struct queue { int …

Member Avatar for gusano79
1
174
Member Avatar for Killer_Typo

Well as of late the only coding that i know is HTML coding, and thats because it is fairly straight forward and easy to do. Ive tried some C programming before i even had the big sams teach yourself book, but it didnt help much, it was too long and …

Member Avatar for FireNet
0
111
Member Avatar for jennie

[FONT=Arial Black]undefined[/FONT][SIZE=5]undefined[/SIZE]HELP! could anybody have this kind of code: code that writes numbers from 1 to 10 in a list and then deletes even numbers.

Member Avatar for FireNet
1
127
Member Avatar for dooda man

[COLOR=Navy][/COLOR]hii, i am computer science student and i am doing win console application program "Project" by c++ compiler "mic visiual 6", the project is like a small data base which stores student names and thier grades and search for names, add, delete,edit and other things. i am asking if i …

Member Avatar for FireNet
2
516
Member Avatar for abu_sager

Hello ; i'm a c++ intermedite programmers from KSU CCIS colleage and i discoverded that i can't write a high quality application without GUI and i want to move to .NET framwork but when i buy a book a say that there is a big difference between them ? is …

0
95
Member Avatar for vio_1960

Let me declare from the start my "innocence" in C++. :cheesy: I did some "C" progs but I ran over a C++ code which I am supposed to modify. Modifications are not hard, but it is hard to get a compilation. :sad: I don't know what compiler had been originally …

Member Avatar for Ashok_beginner
3
680
Member Avatar for phewitt

I'm trying to communicate with a serial port on a PC using Visual C++ to read in data. Does anyone have a simple program to achieve this including relevant header files and function declarations? I’m currently learning C++ but don’t have sufficient knowledge yet.

Member Avatar for Dave Sinkula
1
84
Member Avatar for Kaiser_Sosae

I need to change this code i have written into class I need it done urgently, i have tried, and failed numerous times. [CODE]/* Assignment 2.cpp Michael Ainsworth 15737944 15.05.2004 Assignment 2.cpp Computerized Sketchpad */ //Preprocessor Section #include <iostream> #include <stdlib.h> using namespace std; const int MAXCOMMANDS = 100; const …

Member Avatar for Kaiser_Sosae
1
134
Member Avatar for Vandalf

Good day to you all! :) First, as a new user on this forum, I just have to say that this must be the most useful and informative forum I've ever visited! I'm impressed! Keep up! But, to my thing... I've been learning c++ for a while now, by reading …

Member Avatar for meabed
0
182
Member Avatar for cybergirl

Hey guys, I was wondering if you could help me fix my program. I'm witing a program in C++ that adds, subtracts, multiplies and divides fractions. I'm suppose to put in the cosntructor that the denominator cannot be 0 or a negative number and i also I have to reduce …

Member Avatar for Dave Sinkula
1
404
Member Avatar for TJW

Can similar code be written for 3 dimensions: [CODE] #include <exception> #include <iostream> using std::cin; using std::cout; using std::endl; void display(long double **); void de_allocate(long double **); int m = 3; // ROWS. int n = 5; // COLUMNS. int main(void) { long double **data; try { // EXCEPTIONS. data …

Member Avatar for TJW
0
314
Member Avatar for samaru

This is a great IDE for C++ (Windows). Great for academic programs. It comes with a C++ compiler and a slew of popular c++ libraries already for use. Very simple and intuitive to use if you don't want to use Visual C++, Turbo C++, or DJGPP. Check out the screenshot. …

Member Avatar for FireNet
0
468
Member Avatar for TJW

Hello: (I am using Borland C++ Builder 6 Professional) Before you jump all over me I've already read the post Returing Arrays C/C++ and completely understand. For some reason I am still having difficulty implementing in my project. Very brief Project Explanation: I am collecting data from a laser sensor …

Member Avatar for Natso
0
179
Member Avatar for Natso

Was wondering if there are any tutorials for beginners to C++... specifically for DevC++, I can't find any tutorials for it. I'm semi-experience with C++, but only when programming for DOS output, I'm not at all used to the visual output that is offerend by Dev-C++.

Member Avatar for FireNet
0
134
Member Avatar for dooda man

I am in a project and i am using win simple console application and i would like to know how to make the user choose the directory of files. thnx :idea:

Member Avatar for FireNet
1
164
Member Avatar for matika

is there anything in c++ that provides to print out on screen colored text ex. cout<<"welcome"<<endl; output: [COLOR=Red]welcome[/COLOR] thx

Member Avatar for FireNet
1
191
Member Avatar for Peewee

Well I have looked around the forums. But I cant find the answer to my question. It has been asked many a time. Im a complete novice to the world of programming (I am, lololol) I am trying to decide which path to go down, c, c++, vb, etc. Please …

Member Avatar for Slade
2
315
Member Avatar for elna

[font=Times New Roman]Can anybody tell me if there is a better way to code the following problem than what I’ve included below? The problem that I can see with my code is if you had to add 20 shapes to the list then you would have to add 20 if …

Member Avatar for elna
0
184
Member Avatar for gerizzel

#include <iostream.h> #include <fstream.h> #include <string.h> #include <iomanip.h> //for logfile struct log { long number; char date[9]; char time[9]; char gate[2]; }; //for customers struct customer { long number; char initial[2]; char lname[20]; char snumber[7]; char sname[17]; char stype[17]; char suburb[17]; char state[4]; char postcode[5]; }; //constants for array sizes …

Member Avatar for FireNet
0
156
Member Avatar for bryj3

Thank for all the help you guys have helped me with.. Can someone tell me, how do I ? 1. Declare an array. Call it values with size 25; 2. Initialize this array with any random number 3. Prompt the user to enter any number 4. Search the array for …

Member Avatar for meabed
0
128
Member Avatar for doronsha

Hi All I am a c++ programer tring to run my exe from a java interface. But the java interface that i wrote run on windows and the c++ exe is in unix. This is not helping me: Process p = Runtime.getRuntime().exec("\\bmdth01\\ddef03\\ksh_sh"); the unix is mapped to my comutere via …

0
149
Member Avatar for Dark_Omen

I want to install a GUI library to try out but I cant seem to get it to work. I am using Dev-C++. Can any one help me to get it to work.

Member Avatar for meabed
-1
98

The End.