49,761 Topics
| |
C++ program that will implement the popular numerical procedure called Thomas Algorithm. this is my final project in the lab which i have no idea how to start off... and i am really bad at c++ because this was my first ever programming class i ever took in my life... … | |
how can I GET A EMPTY SQUARE İN C++ LİKE THİS; * * * * * * * * PLS HELP ME | |
Hi, does anyone know or has any idea how to import values from a table and assign it to a variable? For example: Ambient Temperatures| 30 40 50 Corresponding factors |0.9 0.7 0.6 (note the table is in excel format and much larger) [CODE]double At,Ca; cout<<"Enter Value for Ambient temperature"; … | |
Hello. I have an issue with a game I am programming for my c++ project which I am hoping one of you kind souls can help me solve... I consider myself an intermediate beginner in c++. I am coding a space shoot-em-up in c++ with a proprietary graphics library provided … | |
How can we check the data type of a variable in c++ during a program as we already know the data but our program shud tell us data type we are using | |
I'm basically trying to alter the font size for my program in accordance with the resolution; the programming itself is fine, it's more the maths of it which is the problem. For example: 800x600 - physical font height = 22 1024x768 - physical font height = 22 etc etc. As … | |
Hi there, I am using C++ to write a code with MPI functions to solve an integral quadrature. How do I write the function to be integrated (in C++) so that it reads the values from a .dat file? Thanks | |
so heres a snippet of my code: [CODE] cout << "enter keyphrase: \n"; cin >> nextchar; while(nextchar != '.') { isalreadyin = 0; for (int i=0; i<counter; i++) { if (key[i] == nextchar) isalreadyin = 1; } if(isalreadyin ==0) { key[counter]=nextchar; counter ++; } cin >> nextchar; } [/CODE] at … | |
The following function converts a positive decimal number to base 8 and displays the result. [code=c++] void displayOctal (int n) { if (n > 0) { if (n/8 >0) displayOctal(n/8); cout << n%8; } //end if } //end displayOctal [/code] I have to trace the function with n = 100. … | |
hi...i am worjig on project to display numbers entered by user..and display it in random order....i use devcpp.. and here is the code..it does compile but is not working properly..can anyone help me plz as quickly as possible..this is due within 4 days... [CODE]#include<iostream> using namespace std; int main(){ int … | |
hi friends, From many days I wanted to create some application in Windows. Now which IDE would be better (I am also a bit confused with the term IDE ) Turbo c or Borland C++ bulder or Visual c Whatz the difference between these things?? Please someone clear my confusion. … | |
[CODE]#include <iostream.h> #include <stdlib.h> #include <conio.h> #include <iomanip.h> #define FALSE 0 #define TRUE 1 float table_req(void); //Gets Multiplication Number int lines_req(const float); //Gets number of lines void print_out(const int, const float); //Print out of Table int quit(void); //Check Continue request y/n float input_number(void); void main() { int exit = FALSE; … | |
hey can anyone help this is the code i have. i need to ouput the even and odd integers between two integers. i think what i have might work but when i run it it keeps running and never stops. also first num needs to be less then second anyone … | |
Hello. I want to find numbers lies in between (x, y) and [x, y]. I Googled for this and saw that it can be done using boost library. But I can not understand the synopsis. Please help me. | |
hello all, i am trying to make a program using nested for loops that outputs a triangle made of *. so far i have part of the triangle, but am having diffuculty finishing it. my code so far: [CODE] #include<iostream> #include<conio.h> using namespace std void main() { int n = … | |
My problem is that when i run the program i ask the user to select a month from a menu then input a year. I then calulate the first day and janaury for that year. Then i have to find the first day of the month the user selected but … | |
Is there a way to find the length of char i enter from the keyboard? I am entering single digit numbers 0-9 as chars. So i cant enter over 20 chars but i need to find the size of what i enter. Like if i input 123456 i need to … | |
Ok so for my program it prompts the user to enter 32 bits each separated by a space. But while debugging I would like to be able to load a txt file or something that contains the 32 bits instead of having to enter it each time I test it. … | |
I am not sure how to go about writing a function of a generic type that will transfer the data from a linked-list in one array to the linked list in another array. [CODE] #ifndef LINKED_LIST #define LINKED_LIST template <class T> class ListNode { public: T name; ListNode<T> *next; ListNode(T … | |
Hi, Im trying to figure out(again) the best(fastest) way to handle file management..Im using Win32 api, so I always try to use the api routines(instead of the c++ ones), dont know if this is better, but I just feel it is better in this way.. ( On "windows internals" book, … | |
Hello, I am writing a program that does matrix Multiplication using 2-dimensional arrays and a Matrix Class. The program compiles without any errors but when I get to the part of the program where it actually multiplies the 2 matrices it throws an exception. I've looked through the code several … | |
Hello, i've been learning java for a few months now, but i woulld also like to try c++. I tried rewriting one of my exercises in c++, but i cant seem to get objects working. These lines all prodduce errors. Cylinder outer(5,5); Cylinder inner(4,4); cout << "\n" << outer.volume() << … | |
hi! I've searched the internets for this but everything I found was way too vague - is there a source code somewhere for taking a black/white grayscale image, and converting it into a 1/0 2D array (1-black, 0-white or the other way round)? | |
I am trying to parse a xml document and extract certain information. I have looked around quite a bit and haven't been able to find anything that would suit my needs. the sample xml file would look like this: <contact> <name> Daffy Duck </name> <street> 15 Rodeo Drive </street> <city> … | |
Hi, I know this is an old topic, but I still haven't found a solution I completely understood. So I'll just post my case. I'm trying to implement easyhttpd, a server class into an existing ogre class. This httpd server works with a callback function that I need to provide … | |
Okay, this might become a monstous post, and I apologize for that. I recently switched from programming Java to C++ like a week ago, and can't seem to get all the pointers right it seems. Maybe all code provided in this post might seem a little overkill for the size … | |
Hi, I am trying to use zlib library to use it in a string compression application. Look at the piece of code -- [CODE]uLongf DestBuffSize=0; compress2((Bytef*)CompDataBuff, (uLongf*)&DestBuffSize,(const Bytef*)d1, (uLongf)length, Z_BEST_COMPRESSION); [/CODE] In this code the variable DestBuffSize will contain the length of the compressed buffer. But the variable DestBuffSize is … | |
[CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; double average(int sum, int numElms) { int i; double avg; avg = sum/numElms; return sum; } int main() { ifstream fileIn; const int MAX_ARRAY = 500; int scores[MAX_ARRAY]; int numElms, sum; int i; fileIn.open("pgm5data.txt"); //open file if (fileIn.fail() ) { cout … | |
Hello, I'm learning C++ now, but I can't really understand what can I do with a namespace... I don't understand what is a "namespace"... PLZ somebody explain to me... :D | |
i need to write a program that determines whether a meeting room is in violation of fire law regulations regarding the maximum room capacity and the number of people to attend the meeting. if the number of people is less than or equal to the maximum capacity, the program announces … |
The End.