49,761 Topics

Member Avatar for
Member Avatar for Clockowl

Hey guys, Can I tell istream to ignore ALL the characters until the delimiter char? It can be done with a loop but it's kinda weird I can't tell istream "discard until this char" imho, so maybe there's an hidden option somewhere. Thanks in advance!

Member Avatar for Narue
0
277
Member Avatar for elisgugu

Hello! I am using BCB and I really need a help I have to fetch the value from each row in a table and I know I have to add a loop,but when I read the buffer-it takes only the firs value in the firs row in the field and …

Member Avatar for elisgugu
0
101
Member Avatar for Sky Diploma

I am confused by the use of an un-named namespace and its practical applications. The C++ Programming Language states that. [code] namespace { //Content } [/code] [b][COLOR="Green"]is equal to [/COLOR][/b] [code] namespace $$$ { //Content } using namespace $$$; [/code] Where $$$ is a unknown and random name. However I …

Member Avatar for siddhant3s
0
106
Member Avatar for cwarn23

Hi, I'm looking for an open source c++ compiler to embed into an ide project I'm working on. I'm using Visual C++ express 2008 and would like to know what you's recommend as I have heard of gcc and MinGW but don't know what is best and EASIEST as they …

Member Avatar for cwarn23
0
375
Member Avatar for rmlopes

Hi all, I am new to threads in c++, and I must use the pthread library. The documentation is easy to understand, but there is a more general aspect that I am missing. My question is: Is it possible to give a pointer to an object's function as argument to …

Member Avatar for rmlopes
0
116
Member Avatar for saalvi

Problem Statement: Writing and Reading student data in a file. Detailed Description: Write a program in which you have to: 1) Create a text file "Student_info". 2) Using Code Write the following data in it: Roll NO Student Name Class 101 Ali Raza BS(CS) 102 Usman MS(CS) 103 Faizan BS(CS) …

Member Avatar for siddhant3s
0
168
Member Avatar for newToC

Hello everyone. I am new to C++ and, I guess trying to pool task that is to advanced. I have a MDI application written in PowerBuilder. One of the child windows in that application has MultiTab control with several tabs on it. What I’m trying to do is to add …

Member Avatar for newToC
0
170
Member Avatar for vishalag

Hi I am using eclipse under ubuntu for my work. I am calling a function with specified arguments. It builds correctly but while debugging it stops at the call giving the error as "no source available for function()" [code] int f1(a1,a2){ //some description here } int main (){ //call f1 …

Member Avatar for vishalag
0
410
Member Avatar for elisgugu

Hello! I am using BCB and I really need a help! I have to fetch the value from each row in a table and I know I have to add a loop,but when I read the buffer-it takes only the firs value in the firs row in the field and …

Member Avatar for elisgugu
0
144
Member Avatar for Zay

[ICODE]#include <iostream.h> main() { int n, k = 5; n = (100 % k ? k + 1 : k - 1); cout << "n = " << n << " k = " << k << endl; return 0; } [/ICODE] How the value of n become "4" ? …

Member Avatar for kvprajapati
0
1K
Member Avatar for krishnampkkm

[CODE]string source; char *src = (char*)(source.c_str()); LPCWSTR lpszsrc = (LPCWSTR)src; Handle h= CreateFile(lpszsrc,.........); if(h==INVALID_HANDLE) printf("Error occured") return 0; [/CODE] [B]The above code segment always shows invalid file handle.I know the reason is my LPCWSTR conversion is not correct.How to make it correct.?[/B]

Member Avatar for krishnampkkm
0
115
Member Avatar for mrnutty

I know that it returns the remainder but what happens when say : x% y, where x,y is int and x<y. I see that results in x; For example, 3% 101232 = 3 and similarly 3%y, where y is greater than 3 yields 3. Why is that> Just wonder the …

Member Avatar for chaines51
0
257
Member Avatar for cruisx

Hi guys, I am making a memory game for my school project and i just have a few things that i would like to add to it to make it better. In my game, i have a 5x5 grid that has letters hidden by $ underneath. So when the user …

Member Avatar for mrnutty
0
176
Member Avatar for star34

Hi, i made a display()function that uses level-order traversal of the tree to display nodes level-by-level.I was told that I needed to put a queue class in my project. the hint was to put the queue in the root, do regular traversal but when we meet the marker, get() the …

Member Avatar for s_sridhar
0
202
Member Avatar for llemes4011

Hi, I have another question. This one is about header files. I have a header for a player and the opponent of my battleship game. They way I have it set up, the opponent needs a player object to make a move, and vise versa. This is what i have. …

Member Avatar for llemes4011
0
152
Member Avatar for johnnybravo_1

Hello Guys, I've tried my best but it won't work. I'm trying to read an integer from a txt file and return the whole line where this integer resides. So, for example, in my txt file, if I have a line: aaa bbb ccc 100 bb 9 and I type …

Member Avatar for johnnybravo_1
1
770
Member Avatar for dephrate

Hello, I'm writing a program for class that holds information from a parking garage and calculates the cost of parking for each vehicle and the total revenue generated. The code I've written uses a struct Car which contains variables for `Tag#(string)`, `Make(string)`, `Cost(int)`, `Time in(int b/w 1 & 24)`, and …

Member Avatar for dephrate
0
157
Member Avatar for matt4615

Hello, I'm new here. I am trying to make a program that simulates the game Lotto. I have managed to get it to input numbers, but, I cannot figure out how to stop it from having the same number appear twice on the same line. Below is what I currently …

Member Avatar for VernonDozier
0
819
Member Avatar for cougarclaws

Hi all, Class assignment is to list all numbers between user input. I have this much, but have no idea how to get it to list the numbers between them. I know this is simple, but it still eludes me ;) Thanks in advance! [code=cplusplus] #include <iostream> using namespace std; …

Member Avatar for Narue
0
90
Member Avatar for mirfan00

I want to enter password in asteriks and compare it from the file. I compare it but i cannot able to show it in asteriks.If someone knows please solve it ?

Member Avatar for Narue
0
193
Member Avatar for monkey_king

Hi I'm having a very basic newbie problem, The compiler forces me to do a strdup (because of cons correctness), can I void the extra line in my code, and then I cant seem to update my array after the funciton call [CODE=c++] void fix_name(char *name){ if(name[strlen(name)-1]!='/'){ char *tmp = …

Member Avatar for monkey_king
0
186
Member Avatar for giftalp

I have problem to start. I need algorithm for program that prompts the user to input a sequence of characters and outputs the number of vowel, using user-defined value returning function Vowel. Please help

Member Avatar for Dave Sinkula
0
2K
Member Avatar for muthuveerappan

Hi, I am a new user. I was wondering if there is a way to have a alias to a pointer such that the alias is read only (I mean not the the variable it points to is not modifiable) I have explained with an example (code is given below …

Member Avatar for Ancient Dragon
0
90
Member Avatar for llemes4011

Hi, I'm new to C++, I learned to program in Java first. I'm having trouble getting this to work. I'm writing a text based version of battleship. It was going well until i tried to set the size of the ship. I'm using an int array to check to see …

Member Avatar for Narue
0
96
Member Avatar for SanojMathew

DLL crashes with release EXE. I have a client application which tries to load a dll when I bring up it. But it crashes the exe now. With debug exe it loads without any problem. Has anyone faced this kind of issues(release exe crash while dll load)? Anyone has any …

Member Avatar for SanojMathew
0
94
Member Avatar for bluebird
Member Avatar for cwarn23

Hi, I have been learning some c++ with a friend and saw a [URL="http://www.youtube.com/watch?v=nY8z5Eh-kcg&NR=1"]youtube video[/URL] where there were some features I just couldn't find in my version (express edition). I have to ask in which version of Visual Studio 2008 does the Project type [I]Windows Forms Application[/I] appear in where …

Member Avatar for cwarn23
0
127
Member Avatar for asifjavaid

Hi all, I working in VC++. I have a void pointer. I am assigning a memory block to it using malloc(). void* buf_ptr = NULL; buf_ptr = malloc(1428480); I am filling this buffer using fread(). and I want to index this buffer (buf_ptr) to acces its data. How can I …

Member Avatar for asifjavaid
0
2K
Member Avatar for valtikz

[QUOTE]In function `DefaultDialogHandler::handleCommandString(CommandString&)': /home/ws14/Desktop/trunk/test/test1/test2/test3/test4/DefaultDialogHandler.cxx:343: undefined reference to `SipDialogPublish:: SipDialogPublish(MRef<SipStack*>, MRef<SipIdentity*>, bool)' collect2: ld returned 1 exit status[/QUOTE] line 343 here: [code=cpp] MRef<SipDialogPublish*> pub(new SipDialogPublish(sipStack, phoneconf->defaultIdentity, phoneconf->useSTUN ));[/code] Can someone help me about this error...Please explain to me what is this mean..and how can I solve this one. thanks in advance …

Member Avatar for WaltP
0
315
Member Avatar for gretty

Hi I am reading a excel file & grabbing certain elements out of the file to store in arrays. I know how to do it, but can you tell me if there is a more efficient way to do this. This, meaning, grabbing certain elements out of a line/string. Inside …

Member Avatar for ArkM
0
142

The End.