CFanatic

Go Back   CFanatic > Programming > C++ Programming

what does this mean -> cc++/Socket.h? topic posted under C++ Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2010, 08:43 PM
Member
 
Join Date: Feb 2010
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
techme is on a distinguished road
| More
what does this mean -> cc++/Socket.h?

I have problem with my program....it always say cc++/socket.h cannot be found. What is the difference between "socket.h" and "cc++/socket.h"?? and how can I define cc++/socket.h and how can I be sure that its included in the header files or libraries...thanks
Reply With Quote
  #2  
Old 03-23-2010, 08:44 PM
Member
 
Join Date: Feb 2010
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
creative is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

What is the difference between "socket.h" and "cc++/socket.h"??
why ? does it work with just "socket.h" ?

the difference is that the first one "socket.h" has to be in a directory searched by your linker wether it be a compiler include directory or your project directory.
the second one indicates that the file should be in a sub directory of the search path, called cc++.

first find the file on your system to make sure you have it, use search and then find out the path to the file and make sure that your compiler is looking at that directory.
if you check your compiler options and find that it already searches the directory called cc++ then just use #include <socket.h> and dont worry about the cc++/
Reply With Quote
  #3  
Old 03-23-2010, 08:44 PM
Member
 
Join Date: Feb 2010
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
techme is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

Thanks for the reply but why its still is not found since socket.h is alreday in the same directory as the source file??
Reply With Quote
  #4  
Old 03-23-2010, 08:45 PM
pankaj.sea's Avatar
Super Moderator
 
Join Date: Sep 2009
Location: Serampore
Posts: 132
Thanks: 0
Thanked 2 Times in 2 Posts
pankaj.sea is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

Your compiler doesn't know that. In the config you have put the folders with the include files.
Reply With Quote
  #5  
Old 03-23-2010, 08:46 PM
Senior Member
 
Join Date: Feb 2010
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
meyup is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

okay... u have a few things mixed up there... both of u.

when u include something and its in " ", such as #include "stdafx.h", it means that this file is in the same dirrectory as the project's root folder, having "cc++/Socket.h" means that if ur root folder is "c: \my wicked awsome project\", then socket.h is in the folder "c: \my wicked awsome project\cc++\". So if the path is wrong, fix that.

if the inclde has < > around it, such as #include<iostream>, then it is in one of ur compilers include directory. This variers per compiler, and gernerally these are standard. if its #include<cc++/Socket.h>, then ur likely not going to be able to compile it because ur compiler didnt come with the library, unless u add it urself.
Reply With Quote
  #6  
Old 03-23-2010, 08:47 PM
Member
 
Join Date: Feb 2010
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
creative is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

yes the use of "" and <> most likely does vary with compilers .. with mine Visual Studio

"" simply means to START looking in the projects directory if not found then look along the registered paths. It does not exclude the paths its just to save time on compilation if the file is in the project dir the compiler looks there first and has no need to continue

but you could wrap all your includes with quotations and not have a problem like #include "iostream" . I personally just use both forms for clarity so I know whether a header file is a standard header <> or one of my own "" .
not really mixed up just maybe using a different compiler than you are
Reply With Quote
  #7  
Old 03-23-2010, 08:47 PM
Senior Member
 
Join Date: Feb 2010
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
meyup is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

lol, i had to try it and yes the "" do work for iostream... but then again its nothing id try when im used to <>... :P anyways, back to the problem, either ur socket.h doesnt exist, or u put it in the wrong place
Reply With Quote
  #8  
Old 03-23-2010, 08:48 PM
Member
 
Join Date: Feb 2010
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
techme is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

Wow guys I appreciate your concern to help me solve my problem on the issue of using "" or <> in header files. Yes! fortunately, I have fixed the problem now of locating my socket.h. So for recap, my problem is about locating my socket.h from #include<cc++/socket.h> line of command. After raeding your advises, I just used now #include<socket.h> and just add socket.h to the standard header files located in the default folder path of Microsoft Visual studio and it works now.

But I have new problem now about the undefined classes. May I request you experts to please kindly explain to me what these error messages means? :

ERROR MESSAGE WHILE COMPILING:

Compiling...
TCPCOB.CPP
cprogram files\microsoft visual studio\vc98\include\socket.h(84) : error C2079: 'InetAddress' uses undefined class 'CCXX_CLASS_EXPORT'
cprogram files\microsoft visual studio\vc98\include\socket.h(85) : error C2079: 'InetHostAddress' uses undefined class 'CCXX_CLASS_EXPORT'

Thank you soo much guys! I really appreciate your help for me.
Reply With Quote
  #9  
Old 03-23-2010, 08:49 PM
Member
 
Join Date: Feb 2010
Posts: 86
Thanks: 0
Thanked 0 Times in 0 Posts
techme is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

Ok..ok I have solved my problem with the undefined class CCXX_CLASS_EXPORT! I just defined it after the header files and used the command lines:

#ifndef CCXX_CLASS_EXPORT
#define CCXX_CLASS_EXPORT

Now I have the remaining errors to complete my compilation. I am just confused though why SYNTAX ERROR? Did I do somethig wrong in the following lines?

class InetAddress
{
private:
// The validator given to an InetAddress object must not be a
// transient object, but that must exist at least until the
// last address object of its kind is deleted. This is an
// artifact to be able to do specific checks for derived
// classes inside constructors.
const InetAddrValidator *validator;

protected:
struct in_addr * ipaddr;
size_t addr_count;

#if defined(WIN32)
static MutexCounter counter; ---> THIS IS THE LINE WITH ERROR
#else
static Mutex mutex;
#endif
Reply With Quote
  #10  
Old 03-23-2010, 08:49 PM
Senior Member
 
Join Date: Feb 2010
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
meyup is on a distinguished road
| More
Re: what does this mean -> cc++/Socket.h?

well, i cant help u too well unless u tell me what the error message is. could be that what ur trying to decare does not exist, or there is a conflicing variable name, or many other things.
Reply With Quote
Reply

Thread Tools
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 Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ socket programming DynamitMsk C++ Programming 2 01-21-2011 10:14 PM



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.