Programming :: Creating A Program Using Fstream?

Jan 31, 2010

a)using notepad,prepare a text file with marks for 8 students on seperate lines. The program will then read this file and store all the marks into an array.

b)It will then calculate the average marks.

c)Finally, displays all the marks and average marks on the screen.

would you be kind enough to give me the workout solutions.

View 7 Replies


ADVERTISEMENT

Programming :: 'fstream' Does Not Name A Type

Nov 29, 2010

I have included fstream in my file (#include <fstream>) In the file, I have a class declaration and a private variable static fstream fileStopWatch; Then I am getting the error "'fstream' does not name a type" It was working in gcc version 4.1.2 20080704 (Red Hat 4.1.2-48) but not working in gcc version 4.4.4 (GCC)

[Code].....

View 2 Replies View Related

Programming :: Communicate To RS232 Using Fstream?

Apr 1, 2009

I'm trying to attach an fstream to serial port for reading and writing with the following code:

Code:

#include <iostream>
#include <fstream>
#include <string>

[code]....

The code compiles without errors, but doesn't catch any input text from the device attached to RS232. I have tried it with Rx and Tx connected, but didn't receive my text back. It works OK if I substitute /dev/ttyS0 with an ordinary file, but any attempt to use /dev/ttyS0 seems to lead to an empty answer string. I tried this on a PC under Ubuntu Linux 7.10.

View 3 Replies View Related

Ubuntu :: Creating A Startup Program

Sep 19, 2010

Will a program (created using Real Studio) that's placed in the startup queue run? I tried just this, and while there was no error at startup it appears the program had no effect. It is a shell execution to set my screen-blanking time. The program does work once I am up and running though. I am using Linux Mint 8 on a T30 Thinkpad.

View 7 Replies View Related

Ubuntu :: Creating A Simple Gtk Program Through Terminal?

Jun 10, 2011

I am wanting to try creating a simple program through Terminal. Anything will do. A window or button, etc. I haven't found anything simple enough online yet, but I'm sure they're out there. I just want to expand my knowledge of gtk type stuff. Sorry if this is not the correct category to ask this. I was going to put this on the Community Cafe forum, but chose General Help instead. I am running Ubuntu Lucid. **Edit note: I did try the procedure described at the url (below), but I got all kinds of errors in terminal. [URL]

View 1 Replies View Related

Networking :: Creating Own Network Program For Multiple OS

Nov 19, 2009

I have some novice to intermediate programming skills from a past life. What I want to do is create a program and run it on two separate computers to just get them communicating together over the network on a basic level. I would like to do this in a language that doesn't limit me to a specific OS, this way I can have a linux and windows computer talking. However, I would prefer a language that can be useful down the road as well. My second inspiration, next to networking, is web design and web programming, which I hope to dig into as well eventually.

I'm not aiming to do anything overtly-complicated. One example that comes to mind would be a program that forwards any typed characters on one computer over the network and displays them on the other, and vice-versa. I guess the program would run over TCP/IP. However, it would be nice to learn how to do this in a language that not only works on multiple OSes, but also has the ability to allow me to program my own communication protocol, aside from TCP/IP, down the road. My intention with all this is to learn some network programming for fun.

View 11 Replies View Related

Ubuntu :: Creating Simple Program To Automatically Run Command

May 12, 2011

I need a program that automaticly runs this command in the terminal when I use it:
sudo modprobe nvidia_g210m_acpi
Sure, I know that it's not that hard to just write it in terminal and so on, but I really want a program for it. I'm using ubuntu 11.04 if U need to know that?

View 8 Replies View Related

Ubuntu :: Difficulty Creating Launcher For Java Program From Terminal?

Jan 17, 2010

I run a program by executing this command in a terminal screen.Code:coco@coco-desktop:~/Escritorio/MO_1.10/MagnumOpus$ java -jar MagnumOpus.jarSince it is a bit tedious, I tried to create a launcher. I copied the above code into the Command box. The launcher is created, but fails to run the program. Instead I get an error message.

View 6 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Programming :: Creating Database Using C Language

Apr 7, 2011

How to create a database using c language it includes structures, pointers, arrays and switch..

View 4 Replies View Related

Programming :: Creating A Memory Leak In C++?

Dec 16, 2010

I need to write a small program that eats away at availabe memory. I need to creaty a memory leak to test how other programs cope. I need to run this program on linux and see if the available memory is decreasing.

So I have done:
Code:
int main()
{
int *buffer;
while(1)

[Code]...

View 10 Replies View Related

Programming :: Creating C++ Shared Libraries

Apr 4, 2010

I have 2 questions... I couldn't find answers by Googling (more precisely, by Blackling) and in GCC documents, so I'm asking here.

1. There are 2 flags for position independent code, -fpic and -fPIC. All the examples I read use -fPIC... so when is -fpic useful and what is the difference?

2. Some tutorials use "g++ -shared" while others use "ld" for the creation of the shared library. Why? Does it matter which method I use? Is there a difference? Why does nobody mention both options?

View 11 Replies View Related

Programming :: Creating New List Containers C++?

Oct 15, 2010

I need to create a program where the user creates an account and he/she is entitled to add interests and creating friendships with other users.The main algorithm depends on an object which is the user and its attributes are adding interests, friends, so on.Users are stored in a linked list while their interests are stored in another list.What I want to do is every time a new user is created dynamically create a new list during execution for personal info. storage. Is that possible?

View 12 Replies View Related

Programming :: Developing Distro - Creating Own OS

May 1, 2009

I am very much interested in operating systems and I am a beginner. I just finished understanding OS concepts. I want to create my own OS. But I am thinking of creating a linux distro first and then going towards complicated things. How I need to equip myself for creating it. What should I know, learn and where to start.

View 6 Replies View Related

Programming :: Best SDK Tools For Creating Applications?

Jul 21, 2011

I'm new on software development and I interested which SDK tools are best for creating application for WM platform, Android etc. Also my another question is on which distribution of Linux is best to do this?

View 2 Replies View Related

Programming :: Build A Simple Program For C Programming Class?

Feb 12, 2011

im trying to build a simple program for my C programming class, this is the source code

#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;

[Code]...

i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?

View 5 Replies View Related

Programming :: Creating An Automated Bash Scrpit

Feb 2, 2011

list the used variables.

1. display menu until user quits the script
2. menu would give following options to
a. create backup
b. restore files from backup
c. quit
3. for option a or b user would be required to specify the files and name of the archive]
4. has option to be run with use of parameters if that is the case it will not display menu but carry out required task unless it was not possible to do
5. incase of any errors are encountered it would call external scrpit that would display custom disigned error message.

View 6 Replies View Related

Programming :: Creating Child Processes In A Script?

Oct 14, 2010

the wrong part of the forum but basically im working on a project and getting no where what so ever and i was wondering if i could get your help. Basically i have to create two scripts do:

The parent script which is going to:
o spawn several child processes.
o keep track of the progress of the child processes.

[code]...

View 1 Replies View Related

Programming :: Bash - Creating Service For A Script?

May 10, 2010

I wrote a script for capturing port 5060 with tshark.Well, it's only a line, but I needed to send a positional var, and I couldn't do it with an alias. Now I need that script to run as a service, so I can start/stop. (Using CentOS)

Code:

#!/bin/bash
#
# capture service

[code]....

One more thing, my goal is to start/stop the service with

Code:

service myservice start|stop

Is that possible? I read that I must use chkconfig.

View 1 Replies View Related

Programming :: Creating 2 Sockets In Client / Server?

Jun 9, 2010

I have a problem creating my second socket in client file. the program was running well but when I try to add another socket to connect to the same server, I got a problem connecting to the first socket! it doesn't make sense. the original code was:

sockfd[i] = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd[i] < 0) error("(MAIN) - Error openning socket 1");
port_num[i] = portno;
bzero((char*) &serv_addr[i], sizeof(serv_addr[i]));

[Code].....

View 1 Replies View Related

Programming :: Automatic Login By Using Ssh But Without Creating Public Key?

Apr 12, 2010

I want to connect to anothere server from my current server through SSH command.

when I am using the command in the terminal like-- ssh username@ip it is asking me to give password. This is working fine in the terminal. but I want to do it automatic through a shell script.

How can I be able to provide userid and password through shell script?

I was trying to achieve it by creating a public key and copy it to the destination .ssh file. but I dont have the permission to create any file in the destination server.

View 2 Replies View Related

Programming :: BASH Scripting - Creating A Map Tree?

May 7, 2011

looking to write a dependency map tree that creates a tree structure of object names . This tree will be written to a file and read back to create the tree structure of files . how to write this using bash ?

View 1 Replies View Related

Programming :: Module In Cpan For Creating A Blog?

Apr 2, 2010

Exist it a module in cpan for creating a blog?

View 4 Replies View Related

Programming :: Change Priority When Creating New Thread?

Feb 21, 2010

I have created an error logger thread in my application using pthread_create(), I want this thread to have a lower priority than my application's priority so that the application would run properly. Is there an easy way to do this? I know that we can change priority for thread created with policies FIFO or RR, since I don't set the policy for my application, I don't know what to set for my thread.

View 4 Replies View Related

Programming :: Creating Array In Shell Script

Feb 7, 2011

1. How do I create an array with 5 entries
2. Output one of the entries in the array randomly
3. Subtract the entry output from the array
4. Repeat steps 2 and 3 until there are no more entries in the array

View 11 Replies View Related

Programming :: Creating A List Of Word Using Tr Command

Jul 11, 2010

I have a file having name test.txt content of which is following My Self is Arvind Kumar.My Date of Birth is 21/07/1984.I am 26 year year old.I did M.Sc Informatics from Delhi University in 2008.I did B.Sc Electronics from Acharya narendra Dev college Delhi University.I did my schooling from DAV Yusuf sarai.Curren tly I am working with InterGolbe Technologies as a Associate software Engineer.I want to be Linux Expert. What I am doing I am creating a list of words,But i want to take B.Sc and M.Sc as a single word

[Code]....

View 5 Replies View Related

Programming :: Creating Gnome Panel Applet?

Mar 12, 2010

I need to be pointed in the right direction on how to do this project. I simply want a gnome panel applet that will run constantly and, when clicked, will display an IM style list of I.P. addresses that are active on the network I am currently connected to. It should be able to have a configuration menu that will allow the user to specify a subnet mask, and frequency of scan. I am looking for something that will return something similar to the output of:

Code:
nmap -sP xxx.xxx.xxx.xxx-xxx

My question is: What language should I learn to make this happen, and is anyone willing to mentor me through the process?

View 1 Replies View Related

Programming :: Creating Packages Using Mono-develop

Nov 18, 2010

How can I create packages for Windows7 and Linux using C# in mono-develop ? Will the packet be directly installed under Windows7 ?

View 1 Replies View Related

Programming :: Creating Simple Webcam Effects?

Apr 13, 2010

I want to create simple webcam effects filters. I am only interested in doing relatively simple image processing like blurring or averaging the color. I would like to create the filters in either C or Python.

So before I dive into using Gstreamer or V4L I wanted to ask the forum if they have had any experience with webcam development?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved