Member Avatar
Hello All, I am having trouble looping through a 2D array in C++ (should be very easy, but I am just starting C++). At the current moment I have this class file ... amd this header file: ... As you can see, I tried looping through that way, but what …
by sirlink99 44 in Software Development ()
Member Avatar
I am having a problem with reading input data after checking a position marker in the data file. The code that does the reading follows: ... The data that it reads is: ... The code calls the P7 a "password", but it is a position marker in the file so …
by JohnMcPherson in Software Development ()
Member Avatar
I wrote this program that get words from user and if it was entered already it will print you loose but when I the first code crashs but the second code works! why the first code is crashs? ... The diff: ...
by Habib_7 in Software Development ()
Member Avatar
Hi again everybody. I know there are some references to this kind of thing around the web but none of them are simple enough for me to understand. In my code below, I am trying to initialize a function pointer with a class member function but I'm not sure I …
by furalise in Software Development ()
Member Avatar
All of us started from being a rookie, and I'm one of those rookies who are new in this course. Maybe its time for you to share your expertise unto the newbies? Hope anyone might help me willingly in my program.Here's the problem: Use Pointers and Functions: Ask a user …
by exoruel in Software Development ()
Member Avatar
quick question how can I work around this ... I need to be able to take a string and put it into an array of chars, how can i do this?
by kyle.mace.35 in Software Development ()
Member Avatar
Hi guys, I want to access the element of structure from structure pointer using indexing for below code snippet. apart from this I also would like to know is there any way to find the type of member variable of structure on run time.
by can-mohan in Software Development ()
Member Avatar
This snippet defines a function mousepos() which gets the mouse position on the screen. The package python-xlib is required.
by Gribouillis 1,244 in Software Development ()
Member Avatar
When I try SpriteList[ i ] I get a red squiggle under the first '[' with the msg "No operator matches these operands" Trying SpriteList.at( i ) gives a red squiggle under the '.' with the msg "No overloaded function matches the argument list" This is in VS2013 if it …
by jkhippie in Software Development ()
Member Avatar
Hello, I have learnt a few assembly languages (MIPS/x86/ARM/MIX) and I have a question about the call stack. Each of those languages uses a different method for subroutine linkage, and the way I learnt them was not conducive to recursion. Granted, if I continue reading my copy of The Art …
by Labdabeta 182 in Software Development ()
Member Avatar
Hi, I created a structure Vector and implement some functions to make the new defined type (vector) dynamically allocated and resized (inspired from the C++ implementation of the dynamic arrays : vector). I need to assign a structure to every vector element but I am not sure that I am …
by fadoua_1 in Software Development ()
Member Avatar
i'm not sure if a pointer can do the job of an iterator, or otherwise, or they are different things?
by admiri92 in Software Development ()
Member Avatar
So decided I should switch to VS13 for the added benefits. Copied the cold, transfered the files, alls good right? Wrong. Actually its not that bad. Just one main problem. See this fella? This is the one guy that is standing in the way of me and the debachury that …
by CreatorZeus in Software Development ()
Member Avatar
Hi, While executing below code i am getting error like "memory clobbered before allocated block" and due to this assignment is not happening. could you let me know what can be reason for the same. I do understand it is not good to use raw pointer but in current scenario …
by can-mohan in Software Development ()
Member Avatar
i am reading "pointers in c by naveen toppo" .According to him program crashes when it encounter i dont understand why it should crash?i think its correct. *ptr gives int value. please refer attachement.
by ravi_14 in Software Development ()
Member Avatar
i was reading a book and came across this line "C++ matches a pointer of any other type with type void * and prints a numeric representation of the address. If you want the address of the string, you have to type cast it to another type," please any one …
by ravi_14 in Software Development ()
Member Avatar
in the code what is the constant? The pointer or buf?
by kent.johnstone_1 in Software Development ()
Member Avatar
I'm trying to zoom in on a Picturebox when scrolling the mousewheel, the code below zooms in on the image only to the center of the image, not at the current cursor position. How would I fix this?
by Start4me in Software Development ()
Member Avatar
here is question: Write a function that accepts an array of integers and its size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument …
by chubbyy.putto in Software Development ()
Member Avatar
Hi All, I got this code from a forum & tried it on g++/Linux. In the code below i put NULL to a pointer variable but didnt get any errors. can someone please explain this to me ?
by CoolAtt in Software Development ()
Member Avatar
Hello, I came across a strange pointer (in my opinion): Why are so many stars there? It was explained like: "...read inside-out; notice that the innermost element of the expression is *foo, and that otherwise it looks like a normal function declaration. *foo should refer to a function that returns …
by Seba Sama in Software Development ()
Member Avatar
Hello all, I am stuck with a nullpointerException at line 41 and 60.Can someone please help me out.any kind of help will be appreciated. Thanks
by simran_4 in Software Development ()
Member Avatar
How can I create an array of pointer using **P and point it to NULL? Let's say I have coded as below . Now I want to make some of them as NULL If I simply coded as above then it gives me a warning and also the above method …
by Sonu_2 in Software Development ()
Member Avatar
Hi, i'm trying to make 3 different input scenarios using argv. In the code below where there is just one input so when it is argv[0] the calendar for this month comes up, when it is argv[1] so when there are two inputs, it will printout the calendar for the …
by pheonixkid in Software Development ()
Member Avatar
The the program is working but shows wrong answer in average. it should be 4.83 but the program shows 4.00. there is no problem on number bigger than average, it is showing the correct answer. i think i done something wrong on my function and return value or the function. …
by sing1006 -5 in Software Development ()
Member Avatar
Hi, i'm trying to delete last node of linked list and print the remaining list at each step. for this i created 'Print' function. please take a look at this code: someone please tell me .....why the hell it's not working???....... :(
by suhasgh in Software Development ()
Member Avatar
Hello everybody! I’m trying to create a program in which the user has the ability to move the image with mouse click and ability to zoom in and out by scrolling the mouse wheel. If the user wants to return to the original image size and position, it will be …
by Start4me in Software Development ()
Member Avatar
#include "stdafx.h" #include<iostream> #include<conio.h> #include<ctime> using namespace std; int *p[10][20];// int _tmain(int argc, _TCHAR* argv[]) { cout<<sizeof(*p)<<endl; getch(); return 0; } output: 80 but i cannot understand how it work.
by usama sadaqat in Software Development ()
Member Avatar
#include<stdio.h> #include<conio.h> #include<string.h> struct student { int*ptr[23]; char*name[12];//store address of character string }s1; void main() { int roll=20; //char n='s'; s1.ptr=&roll;//ERROR s1.name="zahid ali";//ERROR printf("roll no of student :%d\n",*s1.ptr); printf("name of student:%s\n",s1.name); getch(); }//plase coorect this error
by hassje in Software Development ()
Member Avatar
This is an assingment i've been working on but since this is a merge between two previous developments i need a little help solving my issue here that would be highly appreciated. In a nutshell what this program needs to do is recieve a .txt file create a vector holding …
by Mantroskylo in Software Development ()