Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-20-2008, 03:28 PM
J_I_M_B_O J_I_M_B_O is offline
Newbie
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
J_I_M_B_O is on a distinguished road
Default Adding addtional code to "line 120"

Hi ya

I need to add this to "line 120" of the attached code:

if(gsnatneg(sd, "terminator3", NULL, peer.sin_addr.s_addr, ntohs(peer.sin_port)) < 0) {
printf("- natneg failed\n");
exit(1);
}


I've tried but im not sure exactly where line 120 is. Presumably this refers to the actual code and not the extra information at the top, but not sure if it includes empty lines etc, i really dont know how to count it. I have attached the code, and would be very grateful if someone could show me where to put it.

Thanks
Attached Files
File Type: c gsnatneg.c (14.9 KB, 11 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 06-20-2008, 03:33 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,897
Last Blog:
Web slideshow in JavaS...
Rep Power: 78
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Adding addtional code to "line 120"

Try using a text editor that displays line numbers. Who/what told you to put the code on line 120?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-20-2008, 03:37 PM
J_I_M_B_O J_I_M_B_O is offline
Newbie
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
J_I_M_B_O is on a distinguished road
Default Re: Adding addtional code to "line 120"

Luigi Auriemma :: View topic - natneg

I'm trying to get this Gamespy NAT negotiation protocol working, to query servers behind a router. I did try using a text editor to find lines, but it didnt compile
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-20-2008, 03:39 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,897
Last Blog:
Web slideshow in JavaS...
Rep Power: 78
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Adding addtional code to "line 120"

I dunno. Could you ask in the forum which two lines of text it needs to go between?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-20-2008, 03:42 PM
J_I_M_B_O J_I_M_B_O is offline
Newbie
 
Join Date: Jun 2008
Posts: 3
Rep Power: 0
J_I_M_B_O is on a distinguished road
Default Re: Adding addtional code to "line 120"

Yes, I did ask that. I was wondering if anyone here knew where it would go, I know it has to go in a specific place or it doesnt make sense. Presumably at this line 120?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 06-20-2008, 03:57 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,897
Last Blog:
Web slideshow in JavaS...
Rep Power: 78
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Adding addtional code to "line 120"

Yes, but this could include whitespace - it depends how you type/format it.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Calculator AfTriX VB Tutorials 3 02-29-2008 09:53 AM
Please Help With A C Program!! siren C and C++ 7 04-17-2007 09:45 AM


All times are GMT -5. The time now is 11:36 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads