Programming :: C Program That Displays Shapes - Keep Getting Errors

Oct 10, 2010

Here is my program. It asks the user for input and then prints a shape of a certain length. The errors I get when I compile are:

shape.c: In function "main":
shape.c:22: error: expected identifier or "(" before "int"
shape.c:58: error: expected expression before "return"
shape.c:59: error: expected expression before "}" token
shape.c:59: error: expected expression before "}" token
#include<stdio.h> .....

View 14 Replies


ADVERTISEMENT

Programming :: Supposed To Print Shapes

Oct 10, 2010

I've been working on it for over 20 hours and I'm stuck. It asks the user for input and then prints a shape of a certain length.

View 4 Replies View Related

Programming :: What Kind Of Code Has Shapes In It?

Sep 10, 2010

When I open program files in windows some of them are almost nothing but boxes and triangles. I was always curious what the hell it was.

View 2 Replies View Related

Programming :: QSplashScreen And QPainter - Draw Shapes And Gradients

Apr 7, 2011

Following on from my issues with QSplashScreen, I am wanting to investigate the QPainter class(es) some more.

Code:

How would I best achieve this:

- Draw some shapes and gradients with QPainter/QPen etc
- Create a splash screen out of it
- Display SplashScreen.
I cannot find anything that doesn't involve

Code:

I am comfortable making splash screens out of images, but now I want to try drawing one myself.

View 2 Replies View Related

Programming :: Get Errors When Marc Greis 7 Th Chapter Ping Program Was Tried?

Dec 16, 2010

Please let me know how i will overcome this.I have tried from the past 5 days.

[root@localhost ~]# cc p.cc
In file included from p.cc:1:
/root/ping.h:2:32: warning: multi-character character constant
In file included from p.cc:1:
/root/ping.h:4: error: stray in program
/root/ping.h:2: error: invalid function declaration

[Code]...

View 2 Replies View Related

Programming :: Errors - Make Pop-up Reminders For The Simple Calendar Program?

Feb 21, 2010

First off, I'm completely new to bash scripting so forgive me if I make any egregious errors. I'm trying to make pop-up reminders for the simple calendar program when. This is what I have so far:

Code:
#!/bin/bash
# set the time format for when
#current="$(date +%I:%M %p)"
current="$(date +%-l%p)"
today=~/.when/today

[Code]....

When I run the script, gxmessage pops up and displays the correct information, but it does so for each line in "~/.when/today" that contains a time that matches the current system time (which would be three pop-ups at 10PM, according to the example). I want it to display the information only once. How can this be accomplished? Is a while loop even the right job for this?

View 8 Replies View Related

Ubuntu :: After Starting A Program That Displays Graphics Some Windows Will Go Completely Black?

Jul 22, 2010

After running for a while, often after starting a program that displays graphics, such as Shutter, Gimp, Ocular, or maybe simply having previews in Dolphin (as some of my folders default to large previews)most menus, and some windows will go completely black. Some simply grey out (only ksystemlog does this that I have noticed so far)Blindly clicking anywhere on top title bar has no effect (would expect minimize/maximize etc to work if hitAlt-leftmouse or alt-middlemouse will allow window move/resize - black actively conforms to new window size/shape.

Often this blackening is preceded by a loss of all global hotkeys, which may not be related.With no visible menus or buttons, and with no hotkeys I am forced to hit the PC power button and allow kubuntu to shutdown.If I am lucky and hotkeys still work i can simply log out with ctrl-alt-shitft-del and logging in again fixes the issue.Linux betlogbox 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux

View 1 Replies View Related

Programming :: Valgrind Output Showing Addresses Not Code Against Errors - 2 Errors From 2 Contexts (suppressed: 0 From 0)

Feb 26, 2010

I am running Valgrind on my program. It shows me two errors but mentions only addresses against them and not actual code even on a debug build.

The output is

==23002== Memcheck, a memory error detector.
==23002== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==23002== Using LibVEX rev 1575, a library for dynamic binary translation.

[code]....

View 1 Replies View Related

Programming :: Script That Displays The Directories Alphabetically?

Oct 29, 2010

I am supposed to create a script that displays the directories alphabetically with the size of each directory on the left hand size. I know you should use du to check for disk usage. So far i got the directories to display but not alphabetically.

Code:
du --max-depth =1
Example :
41921 Directory

View 2 Replies View Related

OpenSUSE :: Shapes Of Windows In The Desktop Switcher KDE 4.4.4?

May 24, 2011

Is it possible to get rid of the windowshapes in the desktop switcher application? I just want to see the square of the desktop an it's title, not the ugly shapes of all open windows on it.Or any alternatives?

View 2 Replies View Related

Software :: How To Prevent GIMP From Anti Aliasing Shapes

Jul 7, 2011

For example, if I fill in a circle with black (using the ellipse tool), then fill the surrounding with another color (a dark color) there will be a nearly white outline of the circle. I don't want there to be an outline. The whole canvas should be ALL black.

View 1 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

Ubuntu :: Bunch Of C Errors On Program Compilation - Unsupported And Virtually Unknown

Feb 24, 2011

I'm attempting to install a small application called Asymptopia Flashcard System on Xubuntu x64. It's unsupported and virtually unknown, so I don't know many details about it aside from what I can gather from the source files. The first step in the installation directions is to type "make lib_install" as root at the command line. I get this output:

Making libasymptopia.so ... compiling Path.C ... Path.C: In member function �void Path::listdir(char*, std::deque<char*, std::allocator<char*> >*): followed by a bunch of errors like this: Path.C:38: error: �strcmp� was not declared in this scope

all for the file Path.C, all of them complaining about various header files not being declared. I have the latest version of gcc installed, so I'm very confused about what the problem is. This application is at least a few years old...maybe there's something out-of-date about the way it includes the header files?

View 1 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

OpenSUSE Hardware :: Nvidia Geforce 8600m GT - Few Coloured Shapes In The Background (Video Driver Not Loaded)

Mar 31, 2010

I have a Macbook Pro which i want to install Opensuse 11.2 64bit(Upgrades to 11.3) The problem is that once i install opensuse and then boot via rEFIt, it loads up till the desktop is supposed to appear. All i get at this stage is darkness with a few coloured shapes in the background (Video driver not loaded).I can however reboot and go in via the failsafe option. Once in here i can use the GUI. I am a total noob with linux, can some one give me the instructions on how to install this driver. Its driving me insane. When i run uname -r, the results are 2.6.33-6-default I have added the following http repository (download.nvidia.com/opensuse/11.2/)

View 3 Replies View Related

Programming :: Bash - Use The Call Command (displays The Current Month And The Next Month)?

Mar 8, 2011

how i can use the cal command so it displays the current month and the next month, i know you can use cal -3 9 2007 to show the previous current and next but i just want to display the current and next.

View 9 Replies View Related

Programming :: Regarding Memory Errors In G++?

Jul 22, 2011

I have a general question regarding memory errors. I frequently ran into memory errors such as seg fault, double free, etc. Sometimes I got the following traces for example.

*** glibc detected *** /mnt/click: free(): invalid pointer: 0xb7ed8450 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7dff905]
/lib/libc.so.6[0xb7e011a3]

[code]....

Then, I just run gdb, valgrind things and suddenly I started ask questions myself that what are those traces and how can I analyze?

View 1 Replies View Related

Programming :: Compilation Errors In C?

Sep 7, 2010

When compiling a C program i get the following errors.How do i modify the code to remove these warning messages?

1) "test.c", line 614: warning #4212-D: mismatch between character pointer
types "unsigned char *" and "char *"
p_data = m_lines[p_text_idx];

[code]....

View 2 Replies View Related

Programming :: Errors Using Curses.h?

Feb 28, 2010

I am trying to compile a program for my assignment at school that uses curses.I have installed libncurses5-dev, and curses.h is now in /usr/include, but I am getting all these errors(it compiles fine at school).

Code:
grcunning@grcunning-desktop:~/school/cs474/assign7$ gcc -o proj7 proj7.c
/tmp/cc2ZFXrs.o: In function `main':

[code]....

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

Software :: Alice Animation Program And Ubuntu - Keep Getting Java And Or Alice Errors

Apr 5, 2010

I have been trying to install Alice on the latest version of Ubuntu but keep getting java and or Alice errors. Have not yet found a version set up for Ubuntu and nothing shows up in the repositories.

View 4 Replies View Related

Fedora :: Run C++ Program On Fedora And It Give Errors Of Its Header Files?

May 22, 2010

i have a c++ program and i tried to run it using gcc command and it gives header files error i got the header file now but dont know where to place those files?can any one got the idea??? we could not place header files in usr/include folder!

View 7 Replies View Related

Debian Programming :: Correcting SRT File OCR Errors

Mar 2, 2012

I've generated some srt subtitle files using gocr from pgm files used in DVD's. The ocr program gets confused between lower case L and upper case i and sees them as the same thing. This results in words with capital i's in them instead of lower case L.

What is the best way to automate the correction without a spell checker? I tried sed, but it's difficult to tell between the i's that you want and those that need changing. I figured that any word that consists solely of capital i's is ok, e.g. Roman Numerals, but any capital i not at the beginning of a word needs changing.

View 13 Replies View Related

Programming :: Java AT Command Writing Errors?

Nov 11, 2010

I am running a java application on centos. For now I have a gsm modem connected via the the usb cable. Below is the message I get when I type the command dmesg | grep tty

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
usb 2-2: pl2303 converter now attached to ttyUSB0

[code]....

View 9 Replies View Related

Programming :: Make Gcc To Report Prototype Errors

Sep 6, 2010

I have one simple question: how to tell gcc compiler to check for external functions to be matched by its prototype?

Consider this example:

Code:
master tests # cat file1.c
#include <stdio.h>
#include "file1.h"

[Code]....

what warnings or flag will prevent these examples from sucessful compilation? GCC version: gcc version 4.4.3 (Gentoo 4.4.3-r2 p1.2)

View 6 Replies View Related

Programming :: MySQL Syntax And Code Errors

Feb 10, 2010

I am reading Sams Teach Yourself SQL in one hour a day. In this book they work with both Oracle and MySQL to teach you SQL. So I installed mysql on my box and I am creating the empty database they use in this book so I can follow along as I read. I have noticed a few typos in the book and now I have noticed some code errors too. I just don't know enough to fix em. I am working on creating the empty database and I am getting syntax errors when I create certain tables. I have checked both the printed version of the book and the electronic version (which differ slightly) and both give me the same synatax errors. First is Creating the first table of the database. Here is the code given to me to enter. The Electronic version

[code]...

how I can correct this error and create these tables?

View 5 Replies View Related

Programming :: E2fsck Reports - But Mount Warns Of Errors

Nov 25, 2010

In this case what is the return value of mount. I want to run e2fsck only when either mount fails or mount succeeded but with errors . Is there some way to detect this situatin "mounting fs with errors" in code/script .

View 6 Replies View Related

Programming :: Bash Script Cannot Run Functions - No Syntax Errors

Apr 23, 2011

I have this project which I've been working on essentially nonstop for the past three days and due to work I am running low on time. I'm new to Linux/Unix and my Teacher has assigned us a scripting project, due for Monday. I have All the functions for the project in a separate file which run as a daemon process when I log in. It has no syntax errors but my Script can not run the functions (I'm not sure where they go before or after the body) and I have one function I'd like you guys to take a look at. It has a Second menu leading to a case statement but it does not run after the Search. I'm Kinda tired of looking at the CLI but I have to finish this.

phoneEdi() {
directory=~/phonepro/directory
loop="y"
clear
tput cup 4 4; echo "Record Editor" .....

View 1 Replies View Related

Security :: 2010 CWE/SANS Top 25 Most Dangerous Programming Errors

Apr 7, 2010

The 2010 CWE/SANS Top 25 Most Dangerous Programming Errors is a list of the most widespread and critical programming errors that can lead to serious software vulnerabilities. They are often easy to find, and easy to exploit. They are dangerous because they will frequently allow attackers to completely take over the software, steal data, or prevent the software from working at all.

The Top 25 list is a tool for education and awareness to help programmers to prevent the kinds of vulnerabilities that plague the software industry, by identifying and avoiding all-too-common mistakes that occur before software is even shipped. Software customers can use the same list to help them to ask for more secure software. Researchers in software security can use the Top 25 to focus on a narrow but important subset of all known security weaknesses. Finally, software managers and CIOs can use the Top 25 list as a measuring stick of progress in their efforts to secure their software.

View 1 Replies View Related

Programming :: Bash Script Can't Handle Errors When Run By Cron

Jan 8, 2009

I have a script that that is supposed to send me an e-mail when a host is not responding to ping:

The script works fine when I execute it directly but when cron executes it, the ping error is never picked up by the script so the if statement is ignored.

View 4 Replies View Related







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