49,756 Topics

Member Avatar for
Member Avatar for planktonfist

I'm wiring a program where I have a file with city, state, population size laid out as follows; 24 El Paso, TX 577415 Indianapolis, IN 783612 Detroit, MI 925051 Fort Worth, TX 567516 Los Angeles, CA 3798981 Washington, DC 570898 etc... with 24 being the number of elements in the …

Member Avatar for planktonfist
0
121
Member Avatar for Z101

Hello, I've nearly finished writing a program that converts Roman to arabic numbers, but i've run into a problem to do with the "Batch Mode" of the program. The batch mode involves asking the user to type in the file name (a text file) which contains Roman numerals that need …

Member Avatar for Z101
0
173
Member Avatar for mrmrmrmr

Hi, I am trying to write a linux code which will listen on a UDP port and revceive messages from Zyxel modems. (Zyxel modems have a remote packet tracing feature which uses UDP) I achieved most of the task. The received packet is assigned to a string (char[1024]) variable. But …

Member Avatar for Salem
0
158
Member Avatar for tamlo

Am trying to write a structure to store weather data for a particular month. total rainfall High temp Low temp Average temp Am trying to calculation but not getting anywhere. I need help please. (1)Not sure how to add the 12 rainfall to get the total rainfall and the average …

Member Avatar for Lerner
0
161
Member Avatar for safira

hi..can u help me give an info on how to load an image(eg. .bmp,.jpeg etc) in c++ turbo and display it into 2D array.thank you so much for the help..really appreciate it.

Member Avatar for WaltP
0
72
Member Avatar for DylanWright

[code=c++] #include<stdio.h> #include<conio.h> #include<alloc.h> #include"C:\windows\desktop\input.h" #define MAXBITS 32 #define MAXNODES 512 #define MAXSYMBS 256 int hmin(void); void hinsert(int,int); //First structure struct codetype{ int bits[MAXBITS]; int startpos; }; //second structure struct nodetype{ int freq; int father; int isleft; }; //The structure defined typedef struct hlist{ int pos; int hfreq; struct hlist …

Member Avatar for Salem
0
105
Member Avatar for hectic

i have sorting program, it works well when coded in simple way but when used recursion it give the floating exception (core dumped), it have tries to debug and it show error in the division stage, it tires to do typecasting also, but does not work out for recursion [code=c++] …

Member Avatar for Ancient Dragon
0
241
Member Avatar for sahoo.satya1984
Member Avatar for Ancient Dragon
0
50
Member Avatar for wijitha

hi all i have a integer array of fixed max size(assume 100). But the actual number of stored integers are less than max value(assume 50).Because it is change dynamically. How can i get the actual number of integers stored in the array. regards wijitha

Member Avatar for Nick Evan
0
241
Member Avatar for vrnadh123

Hi, I am accessing MBR to get the first 512bytes from hard disk by using absread() function in C programming. But it is showing error: "you are executing a program which directly accessing the hard disk and it works improper. Close to terminate the program". If i ignore that then …

Member Avatar for Ancient Dragon
0
135
Member Avatar for maHvic

my teacher said that it is easy to learn jave when you already know how to program in c++.. why is is it so? whats the difference and similarity of both languages... thanks.....:-/

Member Avatar for Nick Evan
0
96
Member Avatar for maHvic

can you please help me how to convert characters to binary... for example: you have to convert the word "hello world" to its binary form... i dont know how to do... can you please give me some advice...

Member Avatar for Nick Evan
0
230
Member Avatar for ithelp

Hi Experts, What kind of tool do you use to unit test your C++ code in your project ?

0
50
Member Avatar for chubbs1900

Alright, in this situation I want to take a program that I wrote and modify it so it can take an integers and if any of the numbers are negative, it returns a negative number, but if all the numbers are positive, it returns their average. This is the program …

Member Avatar for WaltP
0
105
Member Avatar for kevinpovec

I am writing a program to convert ints to roman numerals. this is the function that gets called when the user enters a number. it works just fine for number 1-99, but then it will either crash, or give bogus data for any numbers higher that 99. any pointers as …

Member Avatar for WaltP
0
230
Member Avatar for Dean_X

Here is my problem. I have searched everywhere for help on this one. I haven't found any. So, I sat down and tried the best I could to write this code: Now I am stuck: Here is what I have so far: [code] #include <iostream> #include <iomanip> #include <fstream> using …

Member Avatar for WaltP
0
173
Member Avatar for jaepi

Hello there, do you have any idea how to get the user default language code id using standard library functions? There is in win32 (GetUserDefaultLCID) but I have to port it into the linux platform. Thanks :)

Member Avatar for Ancient Dragon
0
46
Member Avatar for chubbs1900

Hey guys, I am trying to create a number triangle that looks like this. 123456789 12345678 1234567 123456 12345 1234 123 12 1 This is where I'm at: [CODE]#include <iostream> using namespace std; int main () { int limit; // Read limit cout << "Please enter a number between 1 …

Member Avatar for vmanes
0
81
Member Avatar for sonturk

a C++ program that calculates the number of times a given substring is found in an input string. Please, check carefully the list standard C-string functions, and decide which of them can be utilized to solve the task. Example: consider a string “tank capacity was measured many times” to search …

Member Avatar for Ancient Dragon
0
97
Member Avatar for rw0

I'm trying to get the CreateProcessA function to work, but it continues giving me trouble and more trouble. Here's the code: [CODE]#include <iostream> #include <string> #include <windows.h> // CreateFile(), CreateProcess(), OpenFile(), etc. and // STARTUPINFO, PROCESS_INFORMATION #include <ctime> // srand(), time(NULL) #include <cstdlib> // rand() using namespace std; string execute(const …

Member Avatar for rw0
0
96
Member Avatar for osva

Is there any way to do a permutation program with conditions.. like enter "n" girls and "m" boys can stand in a line but without two girls standind together or something like that... is there any algorithm to do this.. Thanks in advance.

Member Avatar for osva
0
154
Member Avatar for twickywabbit

Could someone help me with this code, I have syntax errors it appears. Here is the compiler's output: root@bowser03:/usr/include# gcc ouija.c -o ouja ouija.c:430: error: expected declaration specifiers or '...' before 'fp' ouija.c:432: error: expected declaration specifiers or '...' before 'fprintf' ouija.c:435: error: expected declaration specifiers or '...' before 'while' …

Member Avatar for Salem
0
137
Member Avatar for balla4eva33

If I have this main: [CODE] { Matrix m1(3,3), m2(3,6), m3; Matrix m4(2,3); m1 = m1 + m2; m1.print(); m3 = m1 * m2; m3.print(); } [/CODE] then how do I need to adjust this implementation file to work with it!?(Right now I'm just trying to get the '+' '=' …

Member Avatar for balla4eva33
0
155
Member Avatar for mmonaco27

I'm writing a simple complex number class in c++ and we're supposed to overload the four arithmetic operators to work on complex+-/*complex, complex+-*/double, and double+-*/complex. This is easy enough, but I wanted to try and make it a little more generic and instead of coding for doubles, extending the functionality …

Member Avatar for mmonaco27
0
81
Member Avatar for people123

Here is my code, it is suppose to take the double num, round it, and return it using call by reference, but when i try to compile it gives me an ambiguity error at [inlinecode]round(i);[/inlinecode]. please help. [CODE=c++]#include <iostream> #include <cmath> using namespace std; void round(double &num); int main() { …

Member Avatar for people123
0
105
Member Avatar for sartann

am a new in c+= and i hve to do those two functins : strcpy and atoi functin....if anyone can help plz reply thanx alot

Member Avatar for Ancient Dragon
0
73
Member Avatar for shenmue232

Hi guys Ive been having problems with calculations on arrays. What i want to do is times two numbers in an array for example: 4 x 4 = 16 Here's what i'm trying to do double timeArray[3]; cin >> timeArray[0]; cint >> timeArray[1]; answer = timeArray [0] * timeArray[1]; the …

Member Avatar for shenmue232
0
215
Member Avatar for aggagier

I know you use printf to print to the screen. What would I use to send the file to a printer using C++

Member Avatar for ithelp
0
205
Member Avatar for atish00

I am making a quiz show in C++ I need help in storing the answers of a quiz in a array like [QUOTE]cout<<"Q.1 Who is Known as the lady with lamp ?"<<endl<<endl; cout<<"A. Sonia Gandhi "<<"B. Florence Nightngle"<<endl; cout<<"C. Mother Tersa "<<"D. Madame Rozario"<<endl<<endl<<endl;[/QUOTE] So how do I Input the …

Member Avatar for ithelp
0
109
Member Avatar for Jakiro

[B][/B] If the user input a equation something like 2 + 2 * 2 + ( 2 - 2) infix expression. how i collect the data to stack? using string? someone can give the algorithm. I don't have idea to get the input.

Member Avatar for iamthwee
0
138

The End.