General C++ Programming - March 2009 (Page 8)

Particular loop
 
Hello! I know it may be an obvious question, but I haven't to manage an answer anywhere. How do I create a loop that starts when "b" condition is satisfied, b...
[5 replies] Last: I think what you are saying is that once condition b is satisfied, sta... (by Matt23488)
by obai
call a function with vector attributes
 
Hello, I want to call a function with vector attributes. I get an error concerning the declaration of the vector. how could I do it
[2 replies] Last: template <typename T> void pass_vector(vector<T>& v, const vecto... (by turbozedd)
converting char to unsigned long
 
When I try to convert a char to an unsigned long, the unsigned long is padded with 1's instead of 0's if the char is >=128. For example: char c; unsigned l...
[3 replies] Last: They are either signed by default or it is left to the compiler. (by jsmith)
pointers
 
the program explains itself can someone prof read this for me.. #include <iostream> # include <string> #include <iomanip> using namespace std; int var1,v...
[8 replies] Last: Ok, let me modify my previous post. Syntax is: if ( condition... (by jsmith)
Overloading the parenthesis operator
 
I'm trying to make 2d matrix-type grayscale image class whose elements can be accessed with the parenthesis operator like: Image mat; mat(2,3) = 5; int x...
[3 replies] Last: This is exactly a case where exceptions fit the bill. else throw st... (by jsmith)
initialization question
 
class Rational { // class for rational numbers public: Rational(int numerator = 0, int denominator = 1); ~Rational(); ... private: int...
[3 replies] Last: If you declare a constructor, then the compiler does not give you a de... (by jsmith)
Stuck accessing 2d Map's inner elements
 
I'm stuck accessing a 2D map How do I retrieve data out of the inner map? map <string, map <int, class> > myMap How do I retrieve the int and class for e...
[2 replies] Last: You just saved my life. I owe you one. (by dubbelodub)
SQL SERVER
 
Hy, Working actually on a dll in order to learn how to use sql server i found a good tutorial about this subject http://www.codersource.net/c++_ado_stored_...
[9 replies] Last: Thank you again for your help. I deleted stdafx.cpp and stdafx.h and c... (by kobayashi)
Fifo problems any tips c++ masters?
 
here is the program pls help me figure out what is missing? thanks in advance.. #include <iostream.h> #include<conio.h> #include<string.h> int ctr, sw...
[1 reply] : conio.h is non-standard in c++... (by outsid3r)
Processing a Log File
 
Hi All, I am a newbie in C++. Lately I want to write a program to process the Logs which are in the following format ----some unwanted line...
[3 replies] Last: i have write it for you, it outputs in console the lines you wanted. ... (by outsid3r)
Save code??
 
I am making a text based rpg game but since its so big I need a way to make the game save all the data of the user and be able to load it when the person wishes...
[3 replies] Last: You need to evaluate the persistent data that you need to maintain al... (by outsid3r)
Very large numbers
 
I've got a problem where I need to read in from cin a positive decimal number that represents a value from 0 to 2^100. I then have to do some logic to it and sp...
[1 reply] : You don't need to split anything, you just have to use cientific notat... (by outsid3r)
array question
 
Im supposed to use an one dimensional array to solve the following problem: -read 20 numbers between 10 and 100 inclusive -after you read a number validate ...
[3 replies] Last: @greg022549 As you aren't the 1 st person with this problem, I've cr... (by Bazzy)
Programming contest problem
 
Hey guys, I'm trying to solve what seems like a simple problem: http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=4168 and just so you know,...
[1 reply] : Sorry don't have your answer but is there a section on the website say... (by translore)
by masiht
how to add .h file into project ? (1,2)
 
can anyone plesae tell me how to add .h file into programs ?
[21 replies] Last: then you have created a wrong project.. it should be a console applic... (by writetonsharma)
How Can I Add '\0' in char *msg = "Hello World"?
 
char *here = "hello there whats up"; //&here = '\0'; this does not work! 20 is the position after p cout<<here<<" ****"<<endl; cout<<&here <<" **test**"<<e...
[6 replies] Last: when you declare and initialize the pointer same time the string is co... (by writetonsharma)
If statement wont seem to work
 
I am trying to get the user to enter an m for male or f for female and then store it into friend_sex then run that character through an if statement which will ...
[2 replies] Last: Alright it worked. thank you very much for your help. (by tlittle)
FastestPathPossible Function
 
I want to build an INI file that has all 50 states and their connecting states, such as... [North Carolina] Connecting_States=4 ConnectingState1=Virginia ...
[2 replies] Last: You would have to have an altogether very complex function. You would ... (by eker676)
by olove5
Can some one see the compiled error
 
fatal error C1071: unexpected end of file found in comment Pruexamprogram1.cpp fatal error C1071: unexpected end of file found in comment Generating Code...
[2 replies] Last: obviously not using syntax highlighting :-) (by guestgulkan)
operators for type conversion
 
class String { public: String(const char *value); // see Item 11 for pos- ~String(); // sible implementations; ...
[6 replies] Last: That helps. Thanks. (by n4nature)
March 2009 Pages: 1... 678910... 21
  Archived months: [feb2009] [apr2009]

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