General C++ Programming - November 2010 (Page 7)

My code gives the following errors when i try to run the program
 
I have to create a program that does various operations with rational numbers and prints the numbers as a/b and in decimal form. Hi, I am getting the followin...
[7 replies] Last: Hi I looked at the wikipedia link you sent me but I still cannot get t... (by rsantoosa)
by mppk
trying to load a .txt file into a string
 
# include <stdio.h> # include <stdlib.h> # include <iostream> #define ELEMENT 300 #define LENGTH 20 void loadfile(char str ) { FILE *filepointer...
[2 replies] Last: I was very kind and created a solution that DOES work without errors, ... (by joro550)
How should a main function be structured?
 
I have a general question - what should a main function look like. When I program, I only use the main function to link all the other functions together lik...
[2 replies] Last: I agree with your style. Properly splitting tasks into functions ma... (by Disch)
Binary Tree
 
Hello, everybody! I'm writing a code, which should be able to insert a node to a binary tree where specified. Commands are being loaded from a .txt file. ...
[3 replies] Last: That will only stop if you found it. But what if you reach a leaf tha... (by ne555)
IF KeyDown Problem.
 
Hello everyone! I'm new at C++ but have been programming in other languages too, so i'm not a total beginner. I want to make simple games in the command p...
[6 replies] Last: Found a vid showing it on youtube (: Thanks alot! I should be able ... (by Anders4000)
binary tree qns
 
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; class BST { public: BST (); void insert (int); void printB...
[1 reply] : didn't quite understand what you want.. do you want 'max' of an node ... (by hamsterman)
by SeBeQ
Save to struct
 
Hi! I have problem with: struct MyStruct{ WCHAR my01 ; WCHAR my02 ; }; MyStruct My1; wcsncpy(My1.my01,"Some text",256) //- It's ok wcsncpy(My1.my...
[3 replies] Last: Are you sure getFile is TRUE? I don't see you setting it.. Anyway, ... (by hamsterman)
online text based rpg
 
I am making a text based rpg and would like to connect it online so two layers could battle each other. problem is i have no idea how to code that. getting serv...
[12 replies] Last: if anyone still cares or is curious. give me your email and i will giv... (by toxcity007)
Program to send information to another computer running the same program
 
How do i get a C++ program to send specific data to another computer running the same program and then use that information? please help, thank you in advance f...
[1 reply] : http://en.wikipedia.org/wiki/Inter-process_communication (by kbw)
I am totally lost on this question (1,2)
 
Hey!! guys i don't understand loops so i want a little from everyone Here is the question : Write a program that calculates how much a person earns in a ...
[25 replies] Last: are you using namespace std? (by rocketboy9000)
Random Number Generator
 
I am trying to program an application that will generate a test of random preselected questions. I have each of 52 questions assigned a number, and I have it so...
[5 replies] Last: Mark as solved, so others like me don't click it ;p (by Anders4000)
Angle and points math problem
 
First, I apologize if this should be posted in a math forum. But I haven't touch math for more than 3 years, now I need to wright a c++ program that needs the ...
[4 replies] Last: atan2 takes y,x not x,y. This is because it calculates atan(y/x) and a... (by rocketboy9000)
Require some Array assistance
 
I need some help with my functions my program. My program is supposed to prompt the user and to ask them if they want a first class or coach seat and then mark ...
[10 replies] Last: Easy fix: change this: FirstClassSeating (seats, i); to this: Fi... (by rocketboy9000)
What is a better way to code this?
 
I am currently trying to code a program that chooses relevant questions based upon yes/no (1/0) answers to a couple of other questions. It is for observations m...
[2 replies] Last: Use an array literal, like char *messages = {"What color was the po... (by rocketboy9000)
padding strings
 
I'm displaying a string on the screen that I want to appear as though it's highlighted. I figured out how to highlight the text of the string, but the problem ...
[3 replies] Last: Those will be very slow, however. Try calculating the number of space... (by rocketboy9000)
exception in my program
 
exception: std::out_of_range at memory location not sure what this means. below is the function that it yells at me. Exception happens after the System("p...
[4 replies] Last: yeah i got that now, thanks i got it working now (by kyle11778)
Automatically calling overriden parent method from child class
 
I've been searching for a solution to this for ages, and can't seem to be finding anything relevant. The situation: I have a class B, which is a child of c...
[4 replies] Last: True, you have a point there. Was just really hooked on the idea of... (by Daubster)
by bhavz
reading jpef file for image processing
 
Hi. I am new to c++. I am using visual studio c++ 2008 express edition for image processing purposes. First i need to read in a jpeg image after which i can ...
[1 reply] : I don't think there's any default image libraries that come with Visua... (by Daubster)
by troyan
swap for bubble sort with structs
 
My teacher told me to use pointers in the swap function like t = *i; *i = *j; *j = t; but i have no idea how to do it with array of structs Here's my code ...
[2 replies] Last: Thanks a lot! (by troyan)
by Adidas
Advice
 
I need to load info from line I'm getting from txt file any suggestion? if you can also write down some code I'l be glad :)
[9 replies] Last: No, I'm saying that you just show him/it/her a way of reading. (by ne555)
November 2010 Pages: 1... 56789... 21
  Archived months: [oct2010] [dec2010]

This is an archived page. To post a new message, go to the current page.