Lounge<C++>

Today we're daydreaming about C++26 reflection
Ash
Jun 1, 2015 07:43
@BartekBanachewicz ok
Ash
Jun 1, 2015 07:42
I was trying to compile https://github.com/davidgfnet/whatsapp-purple to get a dll file.
code blocks is saying : C:\whatsapp-purple-master\imgutil.c:2:23: fatal error: FreeImage.h: No such file or directory
before I had to add glib-2.0 and libpurple to the project and links were available to them from git hub issues forum.
So I added to project via pkg-config.
can I do the same for FreeImage ?
I have a header file that I found googling ,FreeImage.h.is it enough to place this header files to some libraries thats already present.
Ash
Jun 1, 2015 07:30
@rightfold thnx
Ash
Jun 1, 2015 07:29
I was trying to compile libwhatsapp.dll
Ash
Jun 1, 2015 07:29
actually I don't know much of c++ or any other programming language
Ash
Jun 1, 2015 07:27
:)
Ash
Jun 1, 2015 07:27
I am using windows xp 32 bit
Ash
Jun 1, 2015 07:26
C:\whatsapp-purple-master\imgutil.c:2:23: fatal error: FreeImage.h: No such file or directory
what library should I add to my project ?
 

Java

Dedicated to the discussion of the Java programming language a...
Ash
Apr 14, 2014 19:04
package com;
import java.sql.*;
import java.io.*;
public class DBconnect
{
PreparedStatement ps=null;
Connection con=null;
int i=0;
int created=1;
int inserted=0;
ResultSet rs=null;
int p=0;
public DBconnect()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost/edify","root","ROOT");
}

catch(Exception e)
{
System.out.println("error in connection "+e);
}
}
public int createQuiz(String quizname)
{
try
{
String sql = "INSERT INTO quiz (name)" + "VALUES (?)";
Ash
Apr 14, 2014 19:04
here is the full code:
Ash
Apr 14, 2014 19:01
or just point to some link ?
Ash
Apr 14, 2014 19:01
@fge can you plz expand on that : I am a total noob in java.
Ash
Apr 14, 2014 18:59
the '=1' here comes from the value of p
Ash
Apr 14, 2014 18:58
Ash
Apr 14, 2014 18:58
the exact error message :
Ash
Apr 14, 2014 18:56
It says I have an error in my sql syntax
Ash
Apr 14, 2014 18:56
@fge this is only the part of the whole program.I am getting an error in this method.
Ash
Apr 14, 2014 18:50
If any users happen to know java , can you see any problem in this code ?         public ResultSet showQuestions(String tbl)
{
p=p+1;
try
	{
	String query="select * from "+ tbl + "where no = ? ";
	ps=con.prepareStatement(query);
	ps.setInt(1,p);
	rs=ps.executeQuery();
	System.out.println("values for p is  "+p);
	}
catch(Exception e)
	{
	System.out.println("error while trying to display the quiz database "+e);
	}
	return rs;
}
 

Lounge<C>

C Programming Language Board: It's like an answering machine; ...
Ash
Feb 19, 2014 15:22
./a.out :
enter the no of nodes:
2
plz enter the size of node
50
plz enter the size of node
100
50 ,F,--->100 ,F,--->
why is the result starting on 50 ?
shouldn't it start on THE NULL ??
Or if I assigned head->size=30;
shouldn't it start on 30,NULL-->50,F-->
LIKE THAT ?
Ash
Feb 19, 2014 15:21
output :
Ash
Feb 19, 2014 15:21
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
struct node
{
char name[2];
int size;
struct node *link;
};
typedef struct node nod;
nod *head,*ref;
void main()
{
int n,i=0;
head=(nod *)malloc(sizeof(nod));
strcpy(head->name,"NULL");
head->size=30;
head->link=NULL;
ref=head;
printf("enter the no of nodes: \n");
scanf("%d",&n);
do
{
head->link=(nod *)malloc(sizeof(nod));
strcpy(head->name,"F");
printf("plz enter the size of node\n");
scanf("%d",&head->size);
head=head->link;
Ash
Feb 19, 2014 15:21
program: