49,757 Topics

Member Avatar for
Member Avatar for kirennian

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 …

Member Avatar for Salem
0
125
Member Avatar for misdemeanor01

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

Member Avatar for Ancient Dragon
0
22
Member Avatar for lethal.b

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 …

Member Avatar for WaltP
0
248
Member Avatar for C Newbie

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

Member Avatar for C Newbie
0
261
Member Avatar for top123

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 …

Member Avatar for top123
0
117
Member Avatar for alvalany

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

Member Avatar for Ancient Dragon
0
956
Member Avatar for herrstarr

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

Member Avatar for mattjbond
0
130
Member Avatar for xxxSuperTrooper

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 …

Member Avatar for WaltP
0
740
Member Avatar for Tapas Bose

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.

Member Avatar for Tapas Bose
0
85
Member Avatar for mani_singh

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

Member Avatar for Galf
0
113
Member Avatar for smeghead007

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 …

Member Avatar for smeghead007
0
139
Member Avatar for Jeff_5_7

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 …

Member Avatar for WaltP
0
77
Member Avatar for Kombat

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

Member Avatar for WaltP
0
78
Member Avatar for tshudyb

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 …

0
58
Member Avatar for Icebone1000

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

Member Avatar for Ancient Dragon
0
245
Member Avatar for ParadoxKing

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 …

Member Avatar for Salem
0
406
Member Avatar for skerdzius

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() << …

Member Avatar for skerdzius
1
277
Member Avatar for yuriythebest

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

Member Avatar for Salem
0
42
Member Avatar for Buckoo

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

Member Avatar for Salem
0
107
Member Avatar for underdoeg

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 …

Member Avatar for strmstn
0
196
Member Avatar for emilo35

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 …

Member Avatar for emilo35
0
164
Member Avatar for blackmagic01021

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 …

Member Avatar for Salem
0
712
Member Avatar for JHus00

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

Member Avatar for jonsca
0
129
Member Avatar for juuuh333

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

Member Avatar for mrnutty
0
122
Member Avatar for enderes05

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 …

Member Avatar for enderes05
0
102
Member Avatar for coachkrzyzewski

I'm working in implementing a hash table, and I'm running into a Seg Fault whenever I try to access my buckets :( Here's the code: simple test class [code] //TEST HASH!! #include "hashTable.h" #include <iostream> #include <string> using namespace std; int main() { hashTable htab(101); htab.insert("blah"); cout << htab.contains("blah") << …

Member Avatar for mitrmkar
0
3K
Member Avatar for endframe

Hi everybody, I wanna learn how can I solve this problem of undefined symbols while trying to load them from another function. Here's the code to explain: [CODE]void maxmin(struct ma mx) { int max=mx.ev[0]; int min=mx.od[0]; for (int i=0;i<10;i++) if (mx.ev[i]>max) max=mx.ev[i]; for (int j=0;j<10;j++) if (mx.od[j]<min) min=mx.od[j]; cout<<"The biggest …

Member Avatar for endframe
0
338
Member Avatar for TSaunders84

ok in the first function i am suppose to read in the data from the file for the next node, allcatees the node, assigns the members, and return a pointer to the new node through the function return type i have no idea how to do that can you look …

0
62
Member Avatar for Kosithc

Hello, I am a totally newbie and I would be pleased, if you could help me. Here is the problem: I have created VS 2008 project and configured it for using the ITK (toolkit for medical image analysis - in my case for reading Dicom images). Everything worked OK until …

Member Avatar for Kosithc
0
625
Member Avatar for yogi2345

in my computer tarbo c is not raninig. it show the message"16 bit sub system". what can i do.plz replay in[I] <<snip>>[/I]

Member Avatar for Ancient Dragon
-1
63

The End.