Posts
 
Reputation
Joined
Last Seen
Ranked #552
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
91% Quality Score
Upvotes Received
14
Posts with Upvotes
11
Upvoting Members
8
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
5 Commented Posts
Member Avatar for logicslab

Hi pals, I am a Newbie in C++ Programming field. I plan to add graphics.h header class in Dev -C++ Version 4.9.9.2 from Bloodshed which is come along with Borland Compiler. I follow the Steps in URL : [url]http://www.uniqueness-template.com/devcpp/#step2[/url] But I Got Error in the Sample code which test the …

Member Avatar for James_163
2
27K
Member Avatar for chrjs

I am doing this assignment for my computer science course, and I have to write a function that determines if 'x' can fit into an n-bit, two's complement integer. I am not allowed to use any control statements or operators other than the [ICODE]! ~ & ^ | + << …

Member Avatar for mbelenske
0
2K
Member Avatar for Josue198s

#include<stdio.h> int main() { int pcheck=1,i; int k=1000 for(i=2;i<k;i++) { if((k%i)== 0) { pcheck=0; break; } } if(pcheck) { printf("%d is a prime .\n",k); } else { printf("%d is not a prime.\n",k); } return 0; } this code works to check any number i that write in k but when …

Member Avatar for rajii93
0
220
Member Avatar for sillyboy

I usually listen to music while I'm browsing here, what are you listening to right now? EL-P - Fantastic Damage

Member Avatar for Helianthus
0
5K
Member Avatar for cijeh90

Purpose: To practice writing a simple well-documented (lots of comments) C++ program using repetition structures (loops). Assignment: The power of a repetition structure lies in the fact that a section of code can be executed several times (often using different data) in the same program run. Modify, Laboratory Assignment # …

Member Avatar for azwan91
0
307
Member Avatar for digitalhead

Hi, I wanted to write a C program which searches for text files in a directory(assuming the directory and files are not write protected),list them and open each one of them(files) write a letter A in them.Can anyone give me a sample code. I believe it can be done with …

Member Avatar for ashok.bandari88
0
217
Member Avatar for kutuup

I have no idea what is going on here, first, the code: [CODE] #pragma once #include <stdio.h> //#include <stdafx.h> #include <allegro5/allegro.h> //#include <allegro_image.h> class DisplayController { public: int bitmapx; int bitmapy; // ALLEGRO_DISPLAY display; ALLEGRO_BITMAP *crosshairs; ALLEGRO_EVENT ev; ALLEGRO_EVENT_QUEUE *event_queue; void display() { this->event_queue = al_create_event_queue(); al_register_event_source(event_queue, al_get_mouse_event_source()); al_wait_for_event(event_queue, &ev); …

Member Avatar for kutuup
0
1K
Member Avatar for something_techy

Hello, I am trying to read exact 2 bytes from binary file, and transfer it to int, whatever is it 2 or 4 bytes. Atm on my computer is 4 bytes. So I have two bytes into four bytes scenario. I am using this code [CODE]ifstream in_stream; in_stream.open("test.dat", ios::binary); streamoff …

Member Avatar for Narue
0
294
Member Avatar for Drakarus

I am trying to figure out how to automatically close a simple windows application in C. I know how to create the window. But I have no idea how to get it to automatically close when it has opened without user input/interaction. Basically when it is called upon, I want …

Member Avatar for chrjs
0
147
Member Avatar for wildplace

how do i move the value of %eax to the memory location of %0 [CODE] int size 10; long *list = (long*) malloc(size*sizeof(long)); asm( movl $999, %%eax movl %eax, (%0) // this is what im trying, how do i fix it? :"=r"(list) :"0"(list), "a"(strLen) );[/CODE]

Member Avatar for wildplace
0
117
Member Avatar for p.user01

[CODE] I am a novice programmer and need help..... #include <stdio.h> int main (void) } int n1=2; int n2=0; n2= (++n1) + (++n1); printf("Result= %d",n2); return 0; } Result= 8 How is this possible?? Similarly, #include <stdio.h> int main (void) } int n1=2; int n2=0; n2= (++n1) + (++n1) + …

Member Avatar for WaltP
0
307
Member Avatar for jithuvsjithu

Hello firends , i am new here.. am interested in programming languages... here am sharing some useful graphics codes [B]1.solar system using C[/B] [CODE] #include<stdio.h> #include<graphics.h> #include<conio.h> #include<math.h> #include<stdlib.h> void main() { int gd=DETECT,gm; float i=0,j=100,me=75,ve=23,ma=105,ju=175,sa=10,ur=300,ne=200,pl=175,s=0; int x,y,k,si,sx=random(300),sy=random(400),X,Y,ss; unsigned int earth,moon,mercury,venus,mars,jupiter,saturn,uranus,neptune,pluto,sunsize; void *ear,*moo,*mer,*ven,*mar,*jup,*sat,*ura,*nep,*plu,*sun,*ships,*ships2; x=300; y=210; initgraph(&gd,&gm,"d:\\tc\\bgi"); setfillstyle(1,10); setcolor(2); fillellipse(50,50,13,13); earth=imagesize(35,35,65,65); …

Member Avatar for Soubhik
-1
177
Member Avatar for charchar88

I'm trying to get a C version of this game working on my computer using gcc on ubuntu. [url]http://www.lemoda.net/c/boggle/boggle.html[/url] I have no need for a pearl script or anything since I just have a simple dictionary text file and want to be able to just load in the text file …

Member Avatar for TrustyTony
0
356
Member Avatar for iklila

how to write the interrupt instruction in assembly language and what the diferrent between subroutine and interrupt in assembly language?? anybody can help me??

Member Avatar for Athelas
0
101
Member Avatar for reloadmvp

Create a class Cat with its data members weight & age, each of which defaults to 1. Provide get & set member functions for each data member. Also provide data member functions speak & walk. Both set functions should verify that data members are >0 otherwise set the default value …

Member Avatar for reloadmvp
0
208
Member Avatar for c++lover

hi to all, i want to know how to compiler tsr programme using the borlandc v3.1 compiler anyone know plz guide me what is the command to compile and moreover what are the runtime directories that are we set for tsr programe or generating for .com file i will be …

Member Avatar for chrjs
-1
173
Member Avatar for Labdabeta

Hello, I have a few questions about Assembly. I am extremely new to it! Question 1: How do you write functions in assembly? Is it even possible? Question 2: How do you get an input to a dd variable type (do I have to do the math on four db …

Member Avatar for chrjs
0
100
Member Avatar for yongj

I'm trying to create a C console program that produces a directory listing (one filename per line) of all files matching a specified filename pattern. I'm kind of clueless as to where to start and was wondering if someone could give me a boost? I'm mainly a C++ coder but …

Member Avatar for Ancient Dragon
0
164
Member Avatar for axn

Errors when compiling. its seem to be complaining about line 52 and i do not get output of second file.(data.words) strarray[numStrings++]=strdup(word); $ gcc -Wall -ansi prt.c -o prt In function ‘main’: warning: implicit declaration of function ‘strdup’ warning: assignment makes pointer from integer without a cast [CODE]#include <stdio.h> #include <stdlib.h> …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for anirudhruia

[CODE]#include<stdio.h> int main() { char *arg[10],*c; int count=0; FILE *fp,*fq; printf("Name of the file:"); scanf("%s",arg[1]); fp=fopen(arg[1],"w"); printf("\t\t%s",arg[1]); printf("Input the text into the file\n"); printf("Press Ctrl+d to the stop\n"); while((*c=getchar())!=EOF) { fwrite(c,sizeof(char),1,fp); count++; } return 0; } [/CODE]

Member Avatar for untio
0
131
Member Avatar for toferdagofer

i am writing a decryption program that reads a file from another project solution and decrypts it then writes it to a new file in its own project folder. For some reason when i try and read the file in the program says that file doesn't exist. Im pretty sure …

Member Avatar for Moschops
0
151
Member Avatar for irinaki

I'm very very new to c++.I'm truing to built a program to make new appointment etc. [CODE]#include <iostream> #include <vector> #include <string> using namespace std; class Appointment; class MyDate { private: string date; string hour; public: MyDate();//constructor xoris parametrous// void set_date(string _date) { date=_date; } void set_hour(string _hour) { hour=_hour; …

Member Avatar for chrjs
0
150
Member Avatar for c++lover

hi, im working on josepus problem but this programe is not working well it is working in unlimited loop any one can point out the mistakes????????? #include<iostream> using namespace std; class node { private: int object; node *nextnode; public: int get(){return object;}; void set(int object){this->object=object;}; node *getnext(){return nextnode;}; void setnext(node …

Member Avatar for chrjs
0
111
Member Avatar for cufisa

Hello there everyone. I am in need of assistance in writing a code for my program. What I have to do is write a code to generate the following: (1) * ** *** **** ***** (2) ***** **** *** ** * (3) ***** **** *** ** * (4) * ** …

Member Avatar for aamira_s
0
157
Member Avatar for Kirbyzdashiznit

Write a C program in to calculate the parking fare for customers who park their cars in a parking lot when the following information is given: A. A character showing the type of vehicle : C for car, B for bus, T for truck. B. An integer between 0 and …

Member Avatar for chrjs
0
401
Member Avatar for denmarkstan

i created a new project, added some textboxes and labels with one button. when i built the project the first time, i just got the error: general error c101008d: Failed to write the updated manifest to the resource of file "..\Debug\Login.exe". Access is denied. mt.exe Login someone help me please!

Member Avatar for chrjs
0
190
Member Avatar for tricket_7

I am working on a rainfall program that will ask the user to enter the total rainfall for each month, then will calculate the total rainfall for the year, the average monthly rainfall and is supposed to display the month names for the highest and lowest month. I have everything …

Member Avatar for tricket_7
0
640
Member Avatar for flowerpixie

I am using darkGDK to complete an asignment where I am to create a sprite with a moon background and to make a rocket ship move up with the spacebar pressed and come back down agian when it is released. I can't figure out what I don't have in my …

Member Avatar for chrjs
0
263
Member Avatar for rjbrjb777

helo, my file r.csv is as follows 07 02 2011 09 05 2011 .. .. i don't know what is error. but the function is not being called.. [CODE] #include<stdio.h> #include<stdlib.h> #include<math.h> #include<conio.h> int calday(float,float); int main() {// main start FILE *in, *out; char *rdf,*wdf; char day[10],mon[10],year[10]; float Day,Mon,Year; rdf="A:\\r.csv"; …

Member Avatar for rjbrjb777
0
160
Member Avatar for taumang

hi,i have a pc that uses windows 2007 and there is the files that copied themselves into other documents so when i amtrying to delete them even the original one got deleted.please help

Member Avatar for benmar
0
98