19,876 Topics

Member Avatar for
Member Avatar for rohitamitpathak

i m confused about sprint syntax- i need to create dynamic mysql query so i have to use it, when i take char * it shows a error while when i take char arr[100] (like this )it work fine.. i read syntax from sprint from multiple sites, and it make …

Member Avatar for rohitamitpathak
0
271
Member Avatar for Prisms

Hey guys I am currently writing a code that will take the user input of a number and convert it to its hexadecimal form with the use of Stack ADT. This is what I have so far and would appreciate any help. [CODE]#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "stack.h" …

Member Avatar for WaltP
0
238
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
162
Member Avatar for geoffy0404

so this is my final grade calculator that i turned in, and my teacher came back and said my IF/ELSE structure was Malformed, Is there something i did poorly, or wrong, what can i do to make it better. any suggestions will be taken accounted for [CODE]#include <stdio.h> int main() …

Member Avatar for abhimanipal
0
220
Member Avatar for rohan_k

Hi... i have A File And I Want to read the file and store all of its data in a single file what should i do... Please help.... A C Code Snippet would be very helpful

Member Avatar for abhimanipal
0
244
Member Avatar for ticktoc09

My program is just a simple Quiz game (100% running) w/ 50 questions. My question is do i really need to flowchart all 50 Question? All 50 Questions got the same format. Printf, Input Answer, If,else if statement and so on. I hope you can help me and give me …

Member Avatar for WaltP
0
87
Member Avatar for hohoho89

Ok so now be patient and respectful because this is the first time I've used ncurses. But here's my story. I'm making a application using the ncurses. and I just realized one thing. Whenever I used initscr(). I get approx over 70 000 memory leakage. Any suggestion on what I …

Member Avatar for hohoho89
0
2K
Member Avatar for nory22

hi there am wondering about the space between the [COLOR="red"]"[/COLOR] and the [COLOR="red"]%[/COLOR] scanf([COLOR="red"]"[/COLOR] [COLOR="red"]%[/COLOR]c",&choice); what's the different if i leave no space?

Member Avatar for Narue
0
137
Member Avatar for n3red

So here is my code: The purpose of this code is to take all the plain text in all capital letters in the vitranc.txt file and turn them all in to lowercase characters. Now to my knowledge i can do this with "tolower" function but: when i add tolower in …

Member Avatar for gerard4143
0
112
Member Avatar for moroccanplaya

hi i am just wondering how would you send a website through a socket as i am trying to make my own web server. do you just open up the file, read the file and write out to the socket ? [CODE] openfile = open(home/username/www/index.html, "r"); n = read(openfile,buffer,256); n …

Member Avatar for moroccanplaya
0
83
Member Avatar for nory22

Hi there i have wrote a program ,The user can only Choose the letter S for square or R for rectangle.. i have done every thing as you can see ... the only problem that am having is if the user puts 's' small letter also 'r' small letter .. …

Member Avatar for Arbus
0
187
Member Avatar for nory22

Hi There PLease i Need Help>>>> :) [COLOR="Red"]can any one Write me a program to do the following[/COLOR]..?PLzzz It costs 1.500$ for each 20 minutes traveled by taxi. Enter the rate at which the driver is driving along with the distance that is to be traveled then calculate the amount …

Member Avatar for nory22
-1
204
Member Avatar for iammirko

Hi, I am trying to learn winsock programming using online tutorials. This example is from the MSDN library, although modified. I have compiled it and it seems to be working fine for only one request. After handling a single request the server exits. I have read handling multiple request and …

Member Avatar for Ancient Dragon
0
333
Member Avatar for anthonyjpv

I created a code in C# but cant see any resource online to convert it to php can you help me? Bitmap printscreen = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height); Graphics graphics = Graphics.FromImage(printscreen as Image); graphics.CopyFromScreen(0, 0, 0, 0, printscreen.Size); printscreen.Save(@"C:\printscreen.jpg", ImageFormat.Jpeg);

0
50
Member Avatar for arun_taurean

Hi guys, I'm looking for AES equivalent inverse cipher...Has any one worked on it.. I need a c code for it ... please it's really very urgent..

Member Avatar for jnawrocki
0
1K
Member Avatar for highflyer8

Compiling the following the class in the main program returns error C2784. What could be causing the problem? [CODE]#include <iostream> // Include input/output stream #include <cmath> class threevector { public: double xcoord, ycoord, zcoord; // Default constructor threevector() { xcoord = 0.0; ycoord = 0.0; zcoord = 0.0; } // …

Member Avatar for Fbody
0
536
Member Avatar for george61

Here is code for hexagonal and pentagonal numbers. I need type that stores something bigger than 10 billion. Double works fine to about 8.4 billion. Of course I tried using long long and unsigned long long but it's still not working. Please repair this code because it overflows now matter …

Member Avatar for iammirko
0
403
Member Avatar for SourabhT

[CODE] #include "stdafx.h" #include<iostream> using namespace std; class Base { public: virtual void fun() { cout<<"base"<<endl; } }; class Der:public Base { public: void fun() { cout<<"Der"<<endl; } }; void func(Base b) { b.fun(); } int _tmain(int argc, _TCHAR* argv[]) { Base b; Der d; b.fun(); d.fun(); func(b); func(d); system("pause"); …

Member Avatar for SourabhT
0
160
Member Avatar for Wheaties

I'm not sure what the technical term for this is, so that's why I left the title as general as possible. So, I'm trying to write a program(in C) that will basically allow me to "customize" the size of an already defined array. This would be something done at the …

Member Avatar for WaltP
0
228
Member Avatar for *Java*

how can I run an external program like ( word , notepad ,... )In C ? and how can I set a certain size of the window of the external program like ( 300 * 300 ) ?

Member Avatar for Ancient Dragon
0
294
Member Avatar for chester1908

Heyz all.Im working on a program to add,sort,search etc contact struct (name last name number..).So i add structs and i sort them with qsort (i print the result,they are sorted).I have problem using bsearch(),it keeps returning NULL (so i see printed "not found"). The error must be something with the …

Member Avatar for chester1908
0
398
Member Avatar for dahaker

Hi guys im making this homework on a program that the user will input the time in seconds and it will calculate the velocity and acceleration based on these formulas. Ive tried to compile the program but im getting 2 times "an illegal else without matching if" now the error …

Member Avatar for dahaker
0
3K
Member Avatar for pseudorandom21

Is there a way to store binary code in memory (as a value) then execute it? For instance if I have an array of bytes I have filled with the binary code of say, a .exe, is it possible to execute it?

Member Avatar for gerard4143
0
3K
Member Avatar for sirko

Here's the deal. I need program to read from text txt file and then write numbers into one file and letters into the other... I figured how to read and write to file (using iterators) but I can't figure out how to make the program sort numbers from letters. #include …

Member Avatar for sirko
0
247
Member Avatar for pikachoo

Hello, Is there any tool or anything that can detect errors related to the usage of not allocated memory? For example the code could look like this: [CODE]... char* myptr1; ... char* myptr2=""; ... strcpy(myptr1, "My text"); ... strcpy(myptr2, mystruct.mystring); ... [/CODE] The main problem is that there are lots …

Member Avatar for L7Sqr
0
79
Member Avatar for hket89

Write a program for the following problem. An instructor needs a program that accepts a student identification number and three test scores, test1, test2, and final_test as input, and determines and outputs for each student the semester average and the final letter grade according to the following scheme: SEMESTER AVERAGE …

Member Avatar for dani_277
0
270
Member Avatar for Stefano Mtangoo

Hi, please help me with error. I want to run simple project below. I have a lot of errors below and don't know how to fix it. I use GCC port (Mingw) [CODE=C++]#include "mysql/my_global.h" #include "mysql/mysql.h" #include <stdio.h> int main(int argc, char **argv) { printf("MySQL client version: %s\n", mysql_get_client_info()); } …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for shinsengumi

Can anyone tell me what's wrong with my program below? I'm creating a program that writes every character(byte) from a buffer to a FILE until the number of bytes written is equal to the size of the buffer. [CODE] char *next; int character; int byteswritten = 0; next = buf; …

Member Avatar for shinsengumi
0
219
Member Avatar for alexa868

Hey guys, I'm trying to write a gradebook program in C but I can't get to validate the grades... help please! [CODE]float notas[5]; int x=0; char opcion1; for(x=0; x<5;x++){ do { printf("Ingrese nota %d: ", x+1); scanf("%f", &notas[x]); } while (notas[x]>100 && notas[x]<0);}[/CODE] The user must enter 5 grades. If …

Member Avatar for WaltP
0
99
Member Avatar for efronefron

Hi this is an assignment for my computer science lab. It is weird because if I compile and run with my c compiler from ubuntu gcc4.4, it works perfectly. But if I compile with the university's server (I connect with SSH) it messes up The main purpose of the program …

Member Avatar for efronefron
0
288
Member Avatar for boot-baby-boot

I want to write a simple c++ program that allows me to edit my database tables.Each table stands on its own(no table is related to another).The UI i want is simple.I want my tables to be shown as follows: [LIST=1] [*]Table-One [*]Table-Two [*]Table-Three [*]Table-Four [*]Table-Five [*]Table-Six [*]Table-Seven [*]Table-Eight [*]And-So-Forth [/LIST] …

Member Avatar for Ancient Dragon
0
454
Member Avatar for fadi_1234

how can i make table like this : For example: Fadi recommendattion ----- ---------------- 1212 you must at least gain :1kg if fadi>1212 you must at least gain 1 kg how to make a table like that in c++ and i want to put the result of if in recommendation …

Member Avatar for fadi_1234
0
314
Member Avatar for VasquezPL

I have a big problem. Wheb I try to automate Outlook, I need to make a wrapper...My outlook version is 14. Unfortunatelly I need my proggy to work on all versions of Outlook. how to do that? My code to send email is: [CODE]string allbody; System.Diagnostics.Process.Start("outlook"); Outlook._Application oApp = new …

0
71
Member Avatar for Khoanyneosr

So, I need to find a way to create a way for the computer to ask for input, for this example lets make it 1 and 2. 1 for yes and 2 for no. [CODE] int yes; int no; cout << Do you like orange chicken?" << endl; cout << …

Member Avatar for Khoanyneosr
0
427
Member Avatar for jayzee1989

So yeh, I'm kind of new to c :). So, as far as I know, and array initialized to 0 will stay at 0 unless something is stored by some other function or command. so I have and array here(imgSet) that when I tell my program to print out elements …

Member Avatar for jayzee1989
0
146
Member Avatar for sbcro

Hi, I am trying to draw some rectangles by pressing the mouse button and dragging. Each time a new rectangle is being drawn, the previous one disappears. The question is how can I avoid this? I am programming in C. Thanks!

Member Avatar for orwell84
0
187
Member Avatar for .It.

Hi all, what is the best way to obtain all the possible 3-items groups out of 8 elements (0-7) with repetitions? This would be D'8,3 = 8^3 = 512 groups. I want to save them in an array, like [CODE]unsigned int array[512][3];[/CODE] What is the best approach?

Member Avatar for biswajit_cs07
0
123
Member Avatar for yncee_11

ERRORS: 8 C:\Documents and Settings\csc182\Desktop\devc++\ellipse.cpp `main' must return `int' C:\Documents and Settings\csc182\Desktop\devc++\Makefile.win [Build Error] [ellipse.o] Error 1 what does this errors mean?? here is the code.. #include<stdlib.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int x,y,i; int g=DETECT,d; initgraph(&g,&d,"\tc\bgi"); cleardevice(); x=getmaxx()/2; y=getmaxy()/2; settextstyle(TRIPLEX_FONT, HORIZ_DIR, 3); setbkcolor(rand()); setcolor(4); outtextxy(30,100,"Press"); outtextxy(30,130,"any"); outtextxy(30,160,"key"); outtextxy(30,190, …

Member Avatar for Caligulaminus
0
188
Member Avatar for geoffy0404

if the answer is 90 through 100 it displays an A if the number is between 80 and 89 it will Display a B, but if its any number less then that it wont work. what am i missing? [CODE]if((int) total >= 90 && total <= 100) { printf("%c \n …

Member Avatar for jephthah
0
141
Member Avatar for jhong12

i am making a program that will get the area of a rectangle and tell whether the answer is a prime no. or not. which i failed plz. help me

Member Avatar for bobbyg23
0
71
Member Avatar for mktr

i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 …

Member Avatar for Narue
0
7K
Member Avatar for vineeshvs

i want to write a function to which i need to pass two matrices and get the sum and product of them as output. but how can i return more than one matrix from a function? (i want to pass and return using pointers)

Member Avatar for Akash Saikia
0
154
Member Avatar for vdx

Dear friends, I am trying to compile the linux kernel 2.6.33. I need to incorporate a patch into this. The patch creates a directory and 3 src files as below, [CODE] ~/linux-2.6.33/net/core/[B]netchannel[/B] ~/linux-2.6.33/net/core/[B]netchannel/netchannel.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/storage.c[/B] ~/linux-2.6.33/net/core/[B]netchannel/users.c[/B] [/CODE] Now, among the above users.c file uses a function named 'get_empty_filp()', which is defined …

Member Avatar for biswajit_cs07
0
200
Member Avatar for protas

Hi all, I was making a program as one of our activities. The output should be something like this: [IMG]http://img10.imageshack.us/i/ss1qh.jpg/[/IMG] When I press on Display Output, it should look like this: [IMG]http://img29.imageshack.us/i/ss2pa.jpg/[/IMG] However, when I have to Insert a record, the added record should be added on the record when …

Member Avatar for biswajit_cs07
0
174
Member Avatar for jayzee1989

so, im trying to setup a rule that would "update" lower array indexes with higher ones if the array is full and something needs to be stored ex( [ICODE]imgSet[x]=imgSet [ x + 1])[/ICODE]) but I get ''[B] error C2106: '=' : left operand must be l-value[/B]' I try moving items …

Member Avatar for Momerath
0
237
Member Avatar for s.subbarao

Hi, i want to develop an one final solution to the problem COMPUTER VIRUS. my idea is that to develop an antivirus like software.its not an anti virus but its more better than that. every anti virus softwares like avast,ca, quickhil,kaspersky..... have some drawbacks. to avoid it i want to …

Member Avatar for orwell84
0
113
Member Avatar for shinsengumi

Hi all. I'd like to ask for a way to store a MySQL table content of type VARCHAR to a CHAR variable in C. The MySQL table has three columns: ID (int), Name (varchar(22)), Salary (int). My C program should ask the user to input an ID number, and depending …

Member Avatar for davidchilders
0
266
Member Avatar for jayzee1989

So, have a program I'm working on and so far things seem like they are going like they are supposed to except one thing. When I print the menu for the user and they input something, if the input is not the input for exiting the program, it prints the …

Member Avatar for jayzee1989
0
126
Member Avatar for vineeshvs

1. any problem if i dynamically allocate memory and use only a small part of it? 2. can i free the dynamic memory after each time the function is executed?

Member Avatar for vineeshvs
0
324
Member Avatar for george61

In the following problem I have to find the number > 40755 which is triangular,pentagonal and hexagonal. The formulas for these type of numbers are given below. As I read every hexagonal number is also triangular so we have to compare pentagonal with hexagonal numbers. This algorithm gives 9 digit …

Member Avatar for george61
0
872

The End.