Hi guys,
This is my first post and I'm hoping the experts here can help me solve my problem.
- I'm trying to create a linked list in C and the codes look like this:
#include "stdio.h"
#include
#include
using namespace std;
struct dir_list
{
int level;
string dir_name;
struct dir_list * head;
struct dir_list * tail;
};
typedef struct dir_list * dir;
void main()
{
dir curr;
curr=(dir)malloc(sizeof(string)+sizeof(dir));
curr->level=0;
curr->dir_name="test ";
curr->head=NULL;
curr->tail=NULL;
}
The problem with this code happens at the string assignment curr->dir_name="test "; and the executable will stop responding once run. I suspect the problem could be caused by the size of malloc but the result stays the same after I increased that number.
Can anyone explain to me what the problem is?
Greatly appreciated!
How to give the privillege for triggers?
Hi,
Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place that it is hosted just did some upgrades to their servers and for some reason, now my login page
upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as you can see from my code below it limits only gif and php fileshow do i edit my code to limit all
Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email", "projectmanagment" now each of these "apps" need a mysql table, each of these
Help With editting and deleting form
So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this :Code:
unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
Word Trimming
Hi Guys & Gals!!Hope you are all ok....I need some help with the followingI need to trim the following word as follows:$word = 'James Bond';output would be 'James B'There is a space between
Retrieving Data from Two Different Databases
Hello All, Ran into another problem and would appreciate some help! I have two databases, publications_db (pub_id, title, author, yr, journal, num_pages) and
Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at the last entered variable. Help would be great! <html><head>
Impact of movement type 412 E on MAP
Hi