The house is built of non-standard form. All four walls are of a rectangular shape, but different height and length. The width of the walls is two bricks. There are two types of bricks. The outer part of the wall is constructed from the first type of brick, and the interior - from the second type. Write a program to count the number of required bricks of each type. class brick { private: int length, width, height;// in mm public: void set(int len, int wid, int hei); int getlength() {return length;} int getwidth() {return width;} int getheight() {return height;} }; …

Member Avatar
Member Avatar
+0 forum 8

Apperently there is an undeclared identfiier "stdprn". Please help /* PRINT_IT.C-This program prints a listing with line numbers! */ #include <stdio.h> void do_heading(char *filename); int line, page; main( int argv, char *argc[] ) { char buffer[256]; FILE *fp; if( argv < 2 ) { fprintf(stderr, "\nProper Usage is : "); fprintf(stderr, "\n\nPRINT_IT filename.ext\n" ); exit(1); } if (( fp = fopen( argc[1], "r")) == NULL ) { fprintf( stderr, "Error opening file, %s!", argc[1]); exit(1); } page = 0; line = 1; do_heading( argc[1]); while( fgets( buffer, 256, fp ) != NULL ) { if( line % 55 == 0 …

Member Avatar
Member Avatar
+0 forum 3

hi all pls help me... how to create unique reference id for all users registering in my site...?? tnx in advnc...

Member Avatar
Member Avatar
+0 forum 3

Hi. The function msgget from sys/msg.h is not being recognized by Netbeans 7.2.1. Have I missed anything? OS: OpenSUSE 12.2 "Mantis" #include <stdio.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> extern void exit(); extern void perror(); int main(void) { key_t key; int msgflg, msqid; fprintf(stdout, "All numeric input is expected to follow C conventions:\n"); fprintf(stdout, "\t0... is interpreted as hexadecimal,\n"); fprintf(stdout, "\totherwise, decimal.\n"); fprintf(stdout, "IPC_PRIVATE == %#x\n", IPC_PRIVATE); fprintf(stdout, "Enter key: "); scanf("%d", &key); fprintf(stdout, "\nExpected flags for msgflg argument are:\n"); (void) fprintf(stdout, "\tIPC_EXCL =\t%#8.8o\n", IPC_EXCL); (void) fprintf(stdout, "\tIPC_CREAT =\t%#8.8o\n", IPC_CREAT); (void) fprintf(stdout, "\towner read =\t%#8.8o\n", 0400); (void) fprintf(stdout, "\towner write …

Member Avatar
Member Avatar
+0 forum 2

HI people, First post here, please go easy on me :) #include <iostream> #include <array> int main() { using namespace std; array<int, 5> cppArr = {1,2,3,4,5}; //"missing braces.." error and unresolved symbol highlight return 0; } With "-pedantic -Wall -Werror" specified, compiling the above snippet in eclipse (using cygwin or minGW) would give me an warning/error along the lines of > error: missing braces around initializer for 'std::array<int, 5u>::value_type [5] {aka int [5]}' [-Werror=missing-braces] Adding another pair of braces solves the problem: array<int, 5> cppArr = {{1,2,3,4,5}}; As far as i know the first version of the code is correct …

Member Avatar
Member Avatar
+0 forum 12

All I'm tryin to do is set this up to show the array in the command prompt screen. everything looks good to me, > C:\Users\Work Time\Desktop>javac SearchSource.java but I keep getting this: SearchSource.java:7: error: <identifier> expected System.out.print(); ^ 1 error Heres the program: public class SearchSource { public static void main (String[] args) { int[] SearchSource = newArray[6]; SearchSource = new float[] {-3, 10, 5, 24, 45.3, 10.5}; } System.out.print(); { System.out.println("{" + SearchSource + "}\t"); } } Any ideas?!? Help!

Member Avatar
Member Avatar
+0 forum 2

Hi, I want to generate a unique id but stuck at one point where I need a max 10char long output like A2987F2EWS, 234EGT56GT..... unlike SHA1 or MD5 so human can read it. Code is below but the better way is accaptable by me though. Thanks $mysql_id = 1; $mysql_id_padded = str_pad($mysql_id, 19, '0', STR_PAD_LEFT); $mysql_id_modified = substr($mysql_id, -1, 1) . $mysql_id_padded; echo $mysql_id_modified; //Now I need to generate an id which should be user-friendly

Member Avatar
Member Avatar
+0 forum 5

help i'm rather new at this but have some understanding but am having some probs with 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(19) : error C2660: 'atotal' : function does not take 1 arguments 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(21) : error C2061: syntax error : identifier 'a' 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(23) : error C2660: 'atotal' : function does not take 1 arguments here is my code #include <set> #include <iostream> using namespace std; Dim ; double atotal() ;int main() { double itotal = 0; double dnumber1 = 0.0; double dnumber2 = 0.0; double dnumber3 = 0.0; double daverage = 0.0; double a = 0; cout << "please …

Member Avatar
Member Avatar
+0 forum 2

hi, i'm trying to add a background color to a element which is positioned before the identified tag. for example, i know the class of one elment and i have a list like below. [CODE] <ul id="one"> <li><a href='#'>text0</a></li> <li><a href='#'>text1</a> <ul> <li><a href='#'>text2</a></li> <li><a href='#'>text3</a> <ul> <li class="item-1"><a href='#' class='identified'>item1</a></li> <li class="item-2"><a href='#'>item2</a></li> <li class="item-3"><a href='#'>item3</a></li> </ul> </li> <li class="item-c">C</li> </ul> </li> <li class="item-iii">III</li> </ul> [/CODE] now i want to assign a background color to the 1st level element if i know class='identified' i want to cange the background color of [ICODE]<a href='#'>text1</a>[/ICODE] i used this code which is …

Member Avatar
Member Avatar
+0 forum 2

I searched all over the net trying to find the reason behind why numbers are illegal as first characters in naming identifiers in C++, they say its illegal but they don't say why its illegal Id be glad if someone could tell me why :) , just curious

Member Avatar
Member Avatar
+0 forum 4

I have an [URL="http://pantheonarts.host22.com/xml/feed.xml"]RSS feed[/URL] set up using XML on the website I've developed for [URL="http://pantheonarts.host22.com/"]Pantheon Arts Unlimited[/URL]. I'm still fairly new to PHP and MySQL, so I find myself often jumping to various forums looking for answers for what are usually fairly obvious questions. My newest problem, however, I've yet to find an answer without it being "[I]WordPress[/I]." I want to develop the site at least 80% myself and not rely on third-party sources for such a large undertaking. I like having strict control over my code. Anyways. I have an RSS feed running off XML, and I'm parsing …

Member Avatar
Member Avatar
+0 forum 2

I have an abstract class and two sub classes. Can asp.net ensure that each subclass has a unique ID when a record is created. For example: [CODE] Sub Class #1 1 3 Sub Class #2 2 4 [/CODE] Your help is kindly appreciated. Thank You.

Member Avatar
Member Avatar
+0 forum 1

Hello to all, I need your help,,,I m beginner of the php... i have to generate a user id for register users & it depends upon the batch field,, <option <?php if(($batch)=="1983-86")echo "selected";?>>1983-86</option> <option <?php if(($batch)=="1984-87")echo "selected";?>>1984-87</option> <option <?php if(($batch)=="1985-88")echo "selected";?>>1985-88</option> <option <?php if(($batch)=="1986-89")echo "selected";?>>1986-89</option> i need to select batch="1983-86" , year 1983 last 2 digits... that means 83001,83002,83003.....etc like this i need to generate please help me.........

Member Avatar
Member Avatar
+0 forum 2

The End.