General C++ Programming - August 2011

by DSTR3A
Get Count Of An Occurence
 
I'm using printf and I would like to get a count of how many times the word "file" occurs in the data part. How would I do this in C++ (Windows)? Code.........
[19 replies] Last: Thank you. AndyWestKen. I'm trying your code. However: I'm getting th... (by andywestken)
argv undeclared ? error
 
Hi Guys
[2 replies] Last: Thanks Duoas, this code for doing ping function send, & recieve in ne... (by john1984)
Need to read in A LOT of data from a .txt file
 
I'm currently writing a program that deals with booking flights. I need to read in all of the flight information from a file, the information in the file is jus...
[no replies]
C++ Assign fixed value to int.
 
Hello everybody :D I am making a console app in MSVS 2008. I am trying to achieve something very simple, and that is to assign a fixed value to an int, but I...
[2 replies] Last: Thanks :D (by Muhasaresa)
hello world dev c++
 
Ho here I am again just trying to understand a bit of this software jargon can any one tell me why I cant compile this in dev c++ …….. spent about 2 hours r...
[11 replies] Last: learn in 21 days (by maddave)
Switch Statement - main.cpp:275: error: crosses initialization of `CardNds ssmain'
 
Where do I place brakets when making a declaration within a switch statement? Here is an example of my code: switch(round){ case 1: scoreMatch scoreMa...
[2 replies] Last: much thanks... (by paulmcco)
accessing class problem
 
Ok, let's assume that I've written a class in a file for example A.h: class A { int a; }; and I create another class that contains A (in file B....
[8 replies] Last: Ok, I got it now, it's the idea of understanding how compiler generate... (by sin0emp)
MIT-Licensed(*) App for iOS, MacOS, Win, cross platform, full C++ source!
 
I would like to offer you my MIT-licensed application, which includes projects and build targets for iPad, iPhone, iPod, iPad simulator, iPhone simulator, Mac O...
[no replies]
by gizzmo
Initializing static members
 
Here is the code that doesn't work #include <iostream> class test { public: void print() { std::cout << _n << std::endl; } int& n() { return this-...
[14 replies] Last: Here is a working code #include <iostream> class test { public: int&... (by gizzmo)
passing endl into a function
 
I have a class where I have overloaded the << operator to append incoming strings to a member string. When I'm done appending though I would like to be able to...
[2 replies] Last: http://www.cplusplus.com/reference/iostream/ostream/operator%3C%3C/ o... (by Syuf)
Calling methods from other class objects, and vice versa
 
Hello, I have a query regarding the possibilities of a class method (class A) calling the method of another class (class B), with a method of that class (B) cal...
[4 replies] Last: It doesn't matter how far apart you think 2 classes are: You will alw... (by webJose)
iuser nput of a class object
 
Good morning to everyone!!! Please don't laugh is you think my question is odd. But I'm having troubles with creating a USERinput of a private class object. ...
[2 replies] Last: Thank you very much for your useful and clear explanation. It works n... (by Karajic)
Access Violation--Segmentation Fault
 
Hey you guys...I'm so lost!! I got my program to compile but it crashes as soon as it receives valid input from the user. Program is supposed to receive a pos...
[1 reply] : #include <cstdlib> #include <string> :) Also, you return bin... (by shacktar)
Operator functions in UML diagrams.
 
I have to make a card class and I've been given a UML diagram to follow. I don't think I understand how to write a particular function or how to use it when it ...
[1 reply] : Assuming that's the assignment operator, then: class Card { ... (by shacktar)
SOLVED: compiler giving error within math.h`
 
Hi - This just cropped up: I'm getting an error: error: expected unqualified-id before string constant from within an architecture-specific math.h fi...
[5 replies] Last: I found the problem. Improper syntax in a class declaration caused thi... (by mzimmers)
by mahkoe
Access whole file at once with ifstream?
 
So I want to make a data compression program to test out my idea, but I'm met with a problem. The algorithm I will eventually develop requires that I have acces...
[9 replies] Last: I made a dummy program to test this concept, with *awesome results. I ... (by ModShop)
by warsam
Huffman input not matching output at byte level.
 
I've implemented huffman's algorithm. As I built it, I tested every little step along the way inspecting binary output etc. Everything so far has worked great a...
[2 replies] Last: Thank you so much! I followed your suggestion and noticed that there ... (by warsam)
Database Connection
 
Hello, I need a good source to figure out how to set up a database that I can connect to a C++ program. I know how to code a database in SQL I just need help se...
[2 replies] Last: Thank you I will look into that. I just didn't know what to look at or... (by ddwinters45)
Templates "no matching function for call to"
 
When I try to create an opject of type rbtree it appears to complete the initialization successfully, however, when I try to insert a node using the public memb...
[4 replies] Last: Thanks, that seemed to fix it. (by rtzoeller)
Need help coding (c++)
 
I need a code to move a file from a list like i choose a folder in code with many folders in and this program list all the folders and when i choose copy it'll...
[1 reply] : I don't think you'll get a straight answer with all the needed code, b... (by webJose)
August 2011 Pages: 123... 29
  Archived months: [jul2011] [sep2011]

This is an archived page. To post a new message, go to the current page.