<SUBMISSION>
<ACCESSION-NUMBER>0000899171-05-000044
<TYPE>4
<PUBLIC-DOCUMENT-COUNT>1
<PERIOD>20050511
<FILING-DATE>20050512
<DATE-OF-FILING-DATE-CHANGE>20050512
<REPORTING-OWNER>
<OWNER-DATA>
<CONFORMED-NAME>COWELL CASEY
<CIK>0001158157
</OWNER-DATA>
<FILING-VALUES>
<FORM-TYPE>4
<ACT>34
<FILE-NUMBER>000-21796
<FILM-NUMBER>05824678
</FILING-VALUES>
<BUSINESS-ADDRESS>
<STREET1>3000 RESEARCH DRIVE
<CITY>RICHARDSON
<STATE>TX
<ZIP>75802
</BUSINESS-ADDRESS>
</REPORTING-OWNER>
<ISSUER>
<COMPANY-DATA>
<CONFORMED-NAME>CDW CORP
<CIK>0000899171
<ASSIGNED-SIC>5961
<IRS-NUMBER>363310735
<STATE-OF-INCORPORATION>IL
<FISCAL-YEAR-END>1231
</COMPANY-DATA>
<BUSINESS-ADDRESS>
<STREET1>200 N MILWAUKEE AVE
<CITY>VERNON HILLS
<STATE>IL
<ZIP>60061
<PHONE>8474656000
</BUSINESS-ADDRESS>
<MAIL-ADDRESS>
<STREET1>200 N MILWAUKEE AVE
<CITY>VERNON HILLS
<STATE>IL
<ZIP>60061
</MAIL-ADDRESS>
<FORMER-COMPANY>
<FORMER-CONFORMED-NAME>CDW COMPUTER CENTERS INC
<DATE-CHANGED>19930322
</FORMER-COMPANY>
</ISSUER>
<DOCUMENT>
<TYPE>4
<SEQUENCE>1
<FILENAME>edgar.xml
<DESCRIPTION>PRIMARY DOCUMENT
<TEXT>
<XML>
<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2005-05-11</periodOfReport>

    <issuer>
        <issuerCik>0000899171</issuerCik>
        <issuerName>CDW CORP</issuerName>
        <issuerTradingSymbol>CDWC</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001158157</rptOwnerCik>
            <rptOwnerName>COWELL CASEY</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>200 NORTH MILWAUKEE AVENUE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>VERNON HILLS</rptOwnerCity>
            <rptOwnerState>IL</rptOwnerState>
            <rptOwnerZipCode>60061</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common stock, $.01 par value</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>130166</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common stock, $.01 par value</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>7574</value>
                    <footnoteId id="F1"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>MKW Partners, L.P.</value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Stock Options (Right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>58.44</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2005-05-11</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>5076</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2006-05-11</value>
            </exerciseDate>
            <expirationDate>
                <value>2015-05-11</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common stock, $.01 par value</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>5076</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>5076</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">The reporting person disclaims beneficial ownership of these securities, except to the extent of his pecuniary interest therein.  This report shall not be deemed an admission that the reporting person is the beneficial owner of such securities, except to the extent of his pecuniary interest therein, for purposes of Section 16 or for any other purpose.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>Robert J. Welyki, Attorney-in-fact</signatureName>
        <signatureDate>2005-05-12</signatureDate>
    </ownerSignature>
</ownershipDocument>
</XML>
</TEXT>
</DOCUMENT>
</SUBMISSION>
