You welcome

You have to initilialize the FOO in constructor, FOO is a reference and has to initialize in contructor

[CODE]
class baz
{
private:
int foo;

public:
const int & FOO;
baz() : FOO(foo) {} // constructor
~baz(){ } // destructor

};
[/CODE]

Hi,

line 19 prototype, return type is char, line 172 implementation no return type.

Changed it to return type char and everybody will be happy :)

hmm, it compiles without problems with gcc.

How do you compile it?

Line 39 you should type cast:
[CODE]
median = (element[(int)(nep/2)] + element[(int)(nep/2-1)]) / 2;[/CODE]

Some things got messed up it should be like this:

main.cpp

[CODE]//file1.cpp

include<iostream>
include"file3.h"

using std::cout;
using std::cin;

namespace baz
{
extern MyClass foobar;
}

int main()
{
baz::foobar.setFOO();

baz::foobar.bar();
cout << *baz::foobar.FOO << "\n";

cin.ignore();

return 0;

}
[/CODE]

[CODE]
//file3.h

namespace baz{

class MyClass
{
private:
int foo;

  public:      
  void bar(void);
  void setFOO(void);
  int * FOO;

};

}[/CODE]

[CODE]//file2.c

include"file3.h"

namespace baz
{
MyClass foobar;

void MyClass::bar(void)
{
     foo = 42;
}

void MyClass::setFOO(void)
{
     FOO = &foo;     
}

}

[/CODE]

Hi,

which compilation error do you get?

HI,

first of all, it's not a good idea to store the mail plain, better generate a crypt key, and same the email on your side with the key.

Anyway it would be like this:

[CODE]
<form method="post" action="formposting.php">
<input type="text" name= "title" size="22">
<input type="text" name= "email" size="22">
<?php

if(!$_COOKIE['cookname']) {

echo "<input type=\"checkbox\" name=\"remember\" id=\"remember\" value="<?php if($_COOKIE[$cookname]) print $_COOKIE[$cookname]; ?>"/> Remember me on this computer";
}

else{
echo $email;
echo "Forget Me{delete cookie//help here too}";
}
?>
</div>
<input type="submit" value="post"/>
</form>

if (isset($_POST['remember'])) {
parse_str($_COOKIE[$cookname]);
$number_of_days = 100000 ;
$date_of_expiry = time() + 60 60 24 * $number_of_days ;
setcookie( "cookname", $_POST['remember'], $date_of_expiry, "/", "url.com" );
}
[/CODE]

Line 24.25. is kind of the same?

I you pop you need to release memory and check if you are and the end or will will get an segv. And if you are in C++ a class would just cool.

line 6: should be:

[CODE]void merge(char[],int, char[], int,char[],int*);[/CODE]

better:

[CODE]void merge(char[],int, char[], int,char[],int&);[/CODE]

[CODE]//----------merging-----------
void merge (char array1[],int size1, char array2[],int size2, char c[],int &size )
{
for (int k=0;k< size1;k++)
{
c [k] =array1[k];
}
for (int k=0;k<size2;k++)
{
c [size1+k] = array2[k];

         size=size1+size2;
         }

} [/CODE]

Did you look at c++ algorithm like merge?

Hi!

Can you be more specific?

Hi!

ftp.sendcmd is only for FTP commands. Google gave me this: [url]http://commandline.org.uk/python/sftp-python-really-simple-ssh/[/url]

how about:

[CODE]
struct movieData
{
std::string title;
std::string director;
int year;
int time;
};[/CODE]

Hi,

first of all storing a BLOB is very bad design.

But, it would be like this:

[CODE]blob_value = open('image.jpg', 'rb').read()
sql = 'INSERT INTO Tab1(blob_field) VALUES(%s)'
args = (blob_value, )

cursor.execute (sql, args)
connection.commit()[/CODE]

did you try:

[CODE]
fourMatrix::fourMatrix(fourVector a, fourVector b, fourVector c, fourVector d): i(a),j(b),k(c),l(d){
}[/CODE]

else the compiler takes "i" as local variable

or use:

[CODE]class fourMatrix{
public:
fourVector m_i,m_j,m_k,m_l;

...
}[/CODE]

then you see is a class attribute

[CODE]
fourMatrix::fourMatrix(fourVector i, fourVector j, fourVector k, fourVector l): m_i(i), m_j(j), m_k(k), m_l(l){
}[/CODE]

did you try:

[CODE] fstream file;
file.open("Tbl_cliente.txt", ios::in); // open a file for input
file.unsetf(ios::skipws);

getline(file, Cli_nombre, '#');
getline(file, Cli_apellido, '#');
getline(file, Cli_dirr, '#');
getline(file, Cli_total_compras, '#');
getline(file, Cli_balance, '#');[/CODE]

i see, well when i will do it like this:

[CODE]void check_name()
{ name *strt;
strt = start_ptr;
cout << endl;

      for (name * strt = start_ptr;strt->nxt !=NULL;strt=strt->nxt)
      {      

        if (enter_name == strt->boy_name )
        {
            cout << enter_name << " is ranked #" << strt->rank;
            cout << " in popularity among boys.\n" << endl;
            break;
        }
        else if (enter_name == strt->girl_name) 
        {
             cout << enter_name << " is ranked #" << strt->rank;
            cout << " in popularity among boys.\n" << endl;
             break;

        }
      }
cout << enter_name << " is not ranked among the";
  cout << " top 1000 names." << endl;

}[/CODE]

call check_name() after add_names();

Full code:

[CODE]#include <iostream>

include <cstdlib>
include <fstream>

using namespace std;

struct name
{ int rank;
string boy_name;
string girl_name;
name *nxt;
};

name start_ptr = NULL;
name
current;

void add_names();
void check_name();

string enter_name;

int main()
{
start_ptr = new name;
cout << "Please enter a first name to see its ranking" << endl;
cout << "among the top 1000 baby names." << endl;
cin >> enter_name;
cout << endl;
add_names();
check_name();

system("PAUSE");
return 0;

}

void add_names()
{ //name temp, temp2;
//temp = new name;
name prior = new name;// temp;
int ranking;
//int i=0;
string male_name, female_name;
ifstream in_stream("babynames2004.txt");

//in_stream.open; //opens and loads names & ranks from file
if (in_stream.fail())

{
cout << "File failed to open." << endl;
cout << "Program will now close." << endl;
system("PAUSE");
exit(0);
}

in_stream >> ranking>> male_name >> female_name;

prior = ...
mcap61 commented: Saved my a$$. Thanks for your help, I wish i could return the favor. +1

i would do it like this: [url]http://clipboard.it/v/z2b/[/url] no pointers, better to understand.

Hi!

Sorry the [url]http://www.cs.nccu.edu/~gmilledge/co...ynames2004.txt[/url] doesnt work.

I think you should use std::list, and no pointers if it's not neccessary! It will make your wile easier ;)

[CODE] strcpy(can->name, ch );[/CODE]

better use std::string.

gcc doesn't complain, hmm.

it's looks like Splint has a problem.

did you try:
[CODE]
int r = scanf("%f%f", &height, &weight);

float bmi = (float)weight/(height*height);
[/CODE]

he doesn't like:

[CODE]vector<int[3]> resolutions;[/CODE]

should be:

[CODE]vector<int> resolutions;[/CODE]

if you need an array:

[CODE]vector<list<int>> resolutions;[/CODE]

kirennian commented: Problem solved, thanks. +1

did you try:

[CODE]typedef struct DISPLAY_DEVICE_CAPABILITIES{
vector<int[3]> resolutions;
int brightness;
}DISPLAY_DEVICE_CAPABILITIES;[/CODE]

You should type cast it:

[CODE]float bmi =(float) (weight/(height*height)); [/CODE]

__avd commented: Cool link! +6

You welcome!

if you have it like this:

[CODE]void *ptr;[/CODE]

and give it to send, send will complain, because behind ptr is no memory allocated!

did you try:

[CODE]int i=0;
int ch=recv(new_socket,(void*)&i,sizeof(int),0);
printf("Value of a is :%d\n", i);[/CODE]

The keys are unique, if the key is already present he will be updated.

Use multimap to insert each time a new value.

how are the permissions set?

is -Index active? How the cfg looks like?

the better question is, why it crashes? What is the real reason?