i have 2 sperate projects which i am trying to run together as a shared project but i am failing hard……. Basically, first project does infix to postfix notation and the second projects does postfix evaluation. tried to run all that in 1 project but i keep getting all sorts of error and cannot figure it out, I am kind of lost don’t know what to do. any suggestions would be really appreciated!!!!!!!!! the first 3 files is infix to postfix project and the last one is posftix evaluation. this is the calculator.cpp #include "stdafx.h" #include "Calculator.h" #include <iostream> #include …

Member Avatar
Member Avatar
+0 forum 6

[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to read : "); fflush(stdin); scanf("%s",fname->data); fptr=fopen(fname->data,"rb"); if(fptr == NULL) { perror("Could not open the file "); return; } printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("Contents of the file %s are : ",fname->data); [B] while(fread(&fname, sizeof(data_t), 1,fptr) == 1) { // what do I put here? }[/B] fclose(fptr); return 0; } [/CODE] I want to read …

Member Avatar
Member Avatar
+0 forum 11

Hello there! I've got the following assignment: Write a method in Java called FirstDNAMatch(shortDNA, longDNA) that receives 2 strings with the letters that have to do with the four main nucleobases found in the nucleic acids DNA (A for Adenosine, G for Guanine, C for Cytosine and T for Thymine). The method must return the index of the first spot where the first DNA chain can connect to the second or -1 if there is no spot for the 2 chains to match. A matches with T (and other way round) and C matches with G (and other way round). …

Member Avatar
Member Avatar
+0 forum 9

I'd like to know main differences between C and C++,because they look similar.

Member Avatar
Member Avatar
+0 forum 6

I need my overall data to all be output as double, but my counter is an int, and i imagine you cant use a double as a counter, so when it goes to compute my data, theres a mismatch between my counter and the rest . i need a way of converting my data to double for out put. Here's my code....i have a test also, all it does is call the main method. public class Salary { public void calcSalary() { int wages[]={50000,40000,30000,20000,10000,60000,35000,46000,23000,19000}; final int TOTAL_LENGTH=10; //declare constant int total[]=new int[TOTAL_LENGTH]; int bonus; int counter; System.out.printf("\n%s\t%11s\n\n","REP","SALARY"); for (counter=0; counter …

Member Avatar
Member Avatar
+0 forum 3

Well when I run my program the bar at the top says C:\programing\C++\Test\Test.exe (<<just an example) How do I change this? And how do I make the console window look more XPish (I heard it was called luna). Answer the title one first please. I wnt this too be all from a Console app no WinPrograming.

Member Avatar
Member Avatar
+0 forum 8

Ok, I have chosen my exact path in life and need to learn this: How would I program for Linux? I have only minute ammouts of windows programing so start from absalute basics (like after cout and cin and main() stuff, start at oh something like LinMain or whatever linux uses. I know I said I dont like linux but that is because I cant get it to work (wont post details) So anyone? Also if Linux wasn't programed in c or c++ or d, tell me so I can find the languige, also I consider windows programing and c++ …

Member Avatar
Member Avatar
+0 forum 3

How would I make this program that it tells me the number of odds or evens. I only have 1 number at the time, so I need it to either say 1 odd or 1 even. [CODE]#include <iostream> #include <fstream> using namespace std; void printInfo(); int nonNegative(int a, int k); int nexta(int a); void initialize(int& oddCount , int& evenCount); void getx(int& a); int main() { int count; int num; int zeros; int odds; int evens; int a, k; k = 0; char choice = 'Y'; ofstream outFile; //---------------------------------------- // Call function tagReader with tags1.txt outFile.open("Langlands.txt"); outFile.close(); printInfo(); nonNegative(a, k); initialize(odds, …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I was wondering if someone could help me with this bit of coding. I have set two veriables d1 and d2 to pick a random int of 1 to 10: which I need for in loop but when I run it the same number appear How do I get a differnt verity of numbers during for in loop in Python 3.1.3 please... Thanks for your time. [CODE]# generate random number a certian number of times import random # set vers d1= random.randint(1 ,10) d2= random.randint(1,10) # now print different number 10 times for count in range(1,11): print (d1,d2) …

Member Avatar
Member Avatar
+0 forum 2

I am trying to center a simple navigation menu (horizontal). this is my script so far: [code] <head> <title>Home</title><link rel="menu" href="menu.css" type="text/css" /> <style type="text/css"> body {background-image:url('backg.jpg');} .center body{ text-align:center; /*centers for IE5*/ #menu_box{ text-align:center; /*overrides the centering from above*/ width:675px; /*5 menu items at 135px width (8px padding + 2px border + 125px width)*/ margin:0 auto; /*centers in compliant browsers*/ ul{ list-style:none; margin:0; padding:100; } li { float:left; } a:link,a:visited { display:block; display:circle; width:120px; font-weight:bold; color:#ffffff; background-color:33ff33; text-alaign:center; padding:10px; } a:hover,a:active{ background-color:#ff6633; } } </style> </head> <body> <center> <img src="banner.jpg" alt="banner" width="800px" height="150px"/> </center> <span style="cursor:pointer"> <center> <div id=menu> …

Member Avatar
Member Avatar
+0 forum 11

The End.